]> code.ossystems Code Review - openembedded-core.git/commitdiff
acpid: fix acpid break down
authorBaogen Shang <baogen.shang@windriver.com>
Thu, 21 Nov 2013 06:53:27 +0000 (00:53 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Nov 2013 13:39:33 +0000 (13:39 +0000)
when execute the command "/etc/init.d/acpid stop" and "/etc/init.d/acpid
restart", it prompt "no /usr/sbin/acpid found;none killed",The acpid could
not be restarted because the script start with "!/bin/sh –e", that will
make the script stop when an error occurred. So when no 'acpid' running
(we have stopped it), the script would exit and 'restart' operation would
be stopped by ‘stop’ operation.so avoiding the error occurred, add "-o"
option,exit status 0 (not 1)if nothing done.

Signed-off-by: Baogen Shang <baogen.shang@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/acpid/acpid/init

index 726d9ffd9ede50c7d018ee71bd777632c03d44ab..40ff385c10000fd4677b71b01da9917bb95f56b6 100755 (executable)
@@ -10,13 +10,13 @@ case "$1" in
     if [ ! -d /etc/acpi/events ]; then
         echo "There is not any rule configuration file."
     else
-        start-stop-daemon -S -x /usr/sbin/acpid -- -c /etc/acpi/events
+        start-stop-daemon -o -S -x /usr/sbin/acpid -- -c /etc/acpi/events
         echo "acpid."
     fi
     ;;
   stop)
     echo -n "Stopping Advanced Configuration and Power Interface daemon: "
-    start-stop-daemon -K -x /usr/sbin/acpid
+    start-stop-daemon -o -K -x /usr/sbin/acpid
     echo "acpid."
     ;;
   restart|force-reload)