[OE-core] [PATCH 2/2] acpid: fix acpid break down

Mark Hatle mark.hatle at windriver.com
Thu Nov 21 06:53:27 UTC 2013


From: Baogen Shang <baogen.shang at windriver.com>

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 at windriver.com>
Signed-off-by: Jeff Polk <jeff.polk at windriver.com>
---
 meta/recipes-bsp/acpid/acpid/init      | 4 ++--
 meta/recipes-bsp/acpid/acpid_1.0.10.bb | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-bsp/acpid/acpid/init b/meta/recipes-bsp/acpid/acpid/init
index 726d9ff..40ff385 100755
--- a/meta/recipes-bsp/acpid/acpid/init
+++ b/meta/recipes-bsp/acpid/acpid/init
@@ -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) 




More information about the Openembedded-core mailing list