]> git.pld-linux.org Git - packages/lm_sensors.git/blobdiff - sensors.init
- pre and post moved to sensord package
[packages/lm_sensors.git] / sensors.init
index 17bf43207867cd5d535a0ca3b4d8ce8939cea89a..66207f01db6648cd49f1777d3aa8b5466c39d702 100644 (file)
@@ -22,13 +22,18 @@ case "$1" in
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/sensors ]; then
                if [ -z "$BUS" ] || [ -z "$CHIP" ]; then 
-                       # sensors not configured                
+                       msg_starting "sensors daemon"; fail
+                       nls "BUS or CHIP not configured in /etc/sysconfig/sensors"
                        exit 1
                fi
                
                # insert modules
-               _modprobe single die "i2c-$BUS"
-               _modprobe single die "$CHIP"
+               for i in $BUS; do
+                       _modprobe single die "i2c-$i"
+               done
+               for i in $CHIP; do
+                       _modprobe single die "$i"
+               done
 
                if [ "$SENSORS_SET" = "1" ]; then
                        sensors -s
@@ -54,8 +59,12 @@ case "$1" in
                killproc sensord
                
                # remove kernel modules
-               /sbin/rmmod $CHIP >/dev/null 2>&1 
-               /sbin/rmmod i2c-$BUS >/dev/null 2>&1 
+               for i in $CHIP; do
+                       /sbin/rmmod $i >/dev/null 2>&1
+               done
+               for i in $BUS; do
+                       /sbin/rmmod i2c-$BUS >/dev/null 2>&1
+               done
                
                rm -f /var/lock/subsys/sensors
        else
@@ -64,7 +73,8 @@ case "$1" in
        fi
        ;;
   status)
-       status sensord
+       status sensors sensord
+       sensors
        ;;
   restart)
        $0 stop
This page took 0.035966 seconds and 4 git commands to generate.