From 5f617ffa17537d701a2f645f36895fa0d695d221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Erdmann?= Date: Sun, 26 Oct 2014 18:41:43 +0100 Subject: sysv init scripts: fix == bashism MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test a == b is not available in e.g. dash. Command(s) used for editing: q=\[\"\'\] operand="${q}?[$]?[a-zA-Z0-9_\?]+${q}?" ## doesn't detect ${VAR} test_expr="(\[\s+${operand}\s+)==(\s+${operand}\s+\])" find . -type f -name '[SK][0-9][0-9]*' | \ xargs sed -r -e "s@${test_expr}@\1=\2@g" -i Signed-off-by: André Erdmann Acked-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/acpid/S02acpid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/acpid') diff --git a/package/acpid/S02acpid b/package/acpid/S02acpid index c2221fc3aa..0840305d1c 100755 --- a/package/acpid/S02acpid +++ b/package/acpid/S02acpid @@ -4,12 +4,12 @@ case "$1" in start) echo -n "Starting acpid: " start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n - [ $? == 0 ] && echo "OK" || echo "FAIL" + [ $? = 0 ] && echo "OK" || echo "FAIL" ;; stop) echo -n "Stopping acpid: " start-stop-daemon -K -q -p /var/run/acpid.pid - [ $? == 0 ] && echo "OK" || echo "FAIL" + [ $? = 0 ] && echo "OK" || echo "FAIL" ;; restart) "$0" stop -- cgit v1.2.3