I fixed a couple issues in the RedHat init script provided in the scripts directory.

There are some other things about it that could use updating, but first I checked out the one included with the RPM (https://admin.fedoraproject.org/pkgdb/acls/name/nut). That one looks pretty good, maybe it should replace the included scripts if permission is given by mhlavink?

--- /root/sources/nut-2.6.5/scripts/RedHat/upsd 2012-07-31 10:38:56.000000000 
-0700
+++ /etc/init.d/upsd    2013-09-24 16:36:42.000000000 -0700
@@ -58,16 +58,16 @@
   start)
        # new style drivers uses 'upsdrvctl'
        echo -n "NUT Starting UPS model drivers: "
-       # starting ase nut user
+       # starting as nut user
        daemon --user $NUTUSER `which upsdrvctl` start
-       echo
        if [ $? -eq 0 ]; then
+               echo
                echo -n "NUT Starting UPS daemon: "
-               # starting ase nut user
+               # starting as nut user
                daemon upsd -u $NUTUSER
-               echo
                touch /var/lock/subsys/upsd
        fi
+       echo
        ;;
 
   stop)
@@ -98,9 +98,6 @@
        ;;
 
   status)
-       # new style drivers
-       action "NUT: checking UPS model drivers" upsdrvctl status
-
        status upsd
        ;;
   *)
_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to