From: fedor.ross@ifm.com
To: <openembedded-core@lists.openembedded.org>
Cc: Fedor Ross <fedor.ross@ifm.com>
Subject: [PATCH 1/2] eudev: remove bashism to be compatible with dash
Date: Wed, 18 Nov 2020 18:13:13 +0100 [thread overview]
Message-ID: <20201118171314.5543-1-fedor.ross@ifm.com> (raw)
From: Fedor Ross <fedor.ross@ifm.com>
Remove 'echo -e' and replace it with 'printf'. In bash the builtin
'echo' has an option for interpreting backslash escapes. In a shell like
dash the builtin 'echo' interprets backslash escapes by default.
Therefor the 'echo' in dash doesn't have the '-e' option. When using
'printf' instead it is safe to use it either with bash or dash.
Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
---
meta/recipes-core/udev/eudev/init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init
index 0455ade258..c60dbbf6d5 100644
--- a/meta/recipes-core/udev/eudev/init
+++ b/meta/recipes-core/udev/eudev/init
@@ -52,7 +52,7 @@ case "$1" in
kill_udevd > "/dev/null" 2>&1
# trigger the sorted events
- [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
+ [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug
@UDEVD@ -d
udevadm control --env=STARTUP=1
--
2.20.1
next reply other threads:[~2020-11-18 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 17:13 fedor.ross [this message]
2020-11-18 17:13 ` [PATCH 2/2] sysvinit: remove bashism to be compatible with dash fedor.ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201118171314.5543-1-fedor.ross@ifm.com \
--to=fedor.ross@ifm.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox