* [PATCH 1/2] eudev: remove bashism to be compatible with dash
@ 2020-11-18 17:13 fedor.ross
2020-11-18 17:13 ` [PATCH 2/2] sysvinit: " fedor.ross
0 siblings, 1 reply; 2+ messages in thread
From: fedor.ross @ 2020-11-18 17:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Fedor Ross
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] sysvinit: remove bashism to be compatible with dash
2020-11-18 17:13 [PATCH 1/2] eudev: remove bashism to be compatible with dash fedor.ross
@ 2020-11-18 17:13 ` fedor.ross
0 siblings, 0 replies; 2+ messages in thread
From: fedor.ross @ 2020-11-18 17:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Fedor Ross
From: Fedor Ross <fedor.ross@ifm.com>
Replace the equality operator '==' with '=' inside of '[]' to be
compatible with bash and dash.
Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
---
meta/recipes-core/sysvinit/sysvinit/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index fd1fdd26ba..d0d3149821 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -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.
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-18 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 17:13 [PATCH 1/2] eudev: remove bashism to be compatible with dash fedor.ross
2020-11-18 17:13 ` [PATCH 2/2] sysvinit: " fedor.ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox