]> git.pld-linux.org Git - packages/nut.git/commitdiff
- fixed broken init
authorTomek Orzechowski <orzech@pld-linux.org>
Mon, 28 Oct 2002 10:09:16 +0000 (10:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nut.init -> 1.5

nut.init

index 7e18eb5f1f33f666b2408b55920915a97e7da8e0..276bdf2ecf257e77dcff36bf24e48c2a72d7477d 100644 (file)
--- a/nut.init
+++ b/nut.init
@@ -27,10 +27,14 @@ case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/ups ]; then
-               msg_starting "UPS network daemon"
-               daemon "upsd $OPTIONS"
-               RETVAL=$?
-               touch /var/lock/subsys/ups
+               show "Starting UPS drivers"
+               daemon /usr/lib/nut/upsdrvctl start
+               if [ $? -eq 0 ]; then
+                       msg_starting "UPS network daemon"
+                       daemon "upsd $OPTIONS"
+                       RETVAL=$?
+                       touch /var/lock/subsys/ups
+               fi
        else
                msg_Already_Running "UPS drivers and network daemon"
        fi
@@ -39,6 +43,8 @@ case "$1" in
        if [ -f /var/lock/subsys/ups ]; then
                msg_stopping "UPS daemon"
                killproc upsd
+               show "Stopping UPS drivers"
+               daemon /usr/lib/nut/upsdrvctl stop
                RETVAL=$?
                rm -f /var/lock/subsys/ups
        else
@@ -50,6 +56,8 @@ case "$1" in
        $0 start
        ;;
   reload)
+       msg_reloading "UPS drivers"
+       daemon /usr/lib/nut/upsdrvctl reload
        msg_reloading "UPS network daemon"
        daemon upsd -c reload
        ;;
This page took 0.106271 seconds and 4 git commands to generate.