]> git.pld-linux.org Git - packages/apmd.git/commitdiff
- fixed; thanks to grzespt@pf.pl
authorankry <ankry@pld-linux.org>
Fri, 22 Aug 2003 08:55:29 +0000 (08:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apmd.init -> 1.11

apmd.init

index 670e6e21181c64812ebda574bd686638fb204d68..a46d2b7493da80ca0b360b49b9214e3e5043d126 100644 (file)
--- a/apmd.init
+++ b/apmd.init
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-if [ ! -f /proc/apm ]; then  
-       modprobe apm && echo $(nls "No kernel APM support")'!'; exit 1
+no_kernel_supp() {
+       echo $(nls "No kernel APM support")'!'
+       exit 1
+}
+
+if [ ! -f /proc/apm ]; then
+       modprobe apm || no_kernel_supp
 fi
 
 CONFIG=/etc/sysconfig/apmd
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -24,7 +30,8 @@ case "$1" in
                msg_starting APM
                [ -r "$CONFIG" ] && . "$CONFIG"
                daemon apmd "$APMD_OPTIONS"
-               touch /var/lock/subsys/apmd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apmd
        else
                msg_already_running APM
        fi
@@ -51,3 +58,5 @@ case "$1" in
        msg_usage "$0 {start|stop|restart|force-reload|status}"
        exit 3
 esac
+
+exit $RETVAL
This page took 0.087604 seconds and 4 git commands to generate.