From patchwork Wed Nov 18 17:13:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] eudev: remove bashism to be compatible with dash From: "fedor.ross via lists.openembedded.org" X-Patchwork-Id: 178001 Message-Id: <20201118171314.5543-1-fedor.ross@ifm.com> To: Cc: Fedor Ross Date: Wed, 18 Nov 2020 18:13:13 +0100 From: Fedor Ross 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 --- meta/recipes-core/udev/eudev/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#144783): https://lists.openembedded.org/g/openembedded-core/message/144783 Mute This Topic: https://lists.openembedded.org/mt/78345662/3616849 Group Owner: openembedded-core+owner@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org] -=-=-=-=-=-=-=-=-=-=-=- 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