eudev: remove bashism to be compatible with dash
PATCH 1/2 eudev: remove bashism to be compatible with dash
From: Fedor Ross <[email protected]>
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 <[email protected]>
--- meta/recipes-core/udev/eudev/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/eudev/init +1 -1
@@ -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
Signature · 1 line
2.20.1
PATCH 2/2 sysvinit: remove bashism to be compatible with dash
From: Fedor Ross <[email protected]>
Replace the equality operator '==' with '=' inside of '[]' to be compatible with bash and dash.
Signed-off-by Fedor Ross <[email protected]>
--- meta/recipes-core/sysvinit/sysvinit/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/sysvinit/sysvinit/rc +1 -1
@@ -63,7 +63,7 @@ startup() { stty onlcr 0>&1 # Limit stack size for startup scripts - [ "$STACK_SIZE" == "" ] || ulimit -S -s $STACK_SIZE + [ "$STACK_SIZE" = "" ] || ulimit -S -s $STACK_SIZE # Now find out what the current and what the previous runlevel are.
Signature · 1 line
2.20.1