. /etc/sysconfig/sensors_modules
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/sensors_modules ]; then
if [ -z "$BUS" ] || [ -z "$CHIP" ]; then
else
msg_already_running "sensors modules"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/sensors_modules ]; then
msg_stopping "sensors modules"
else
msg_not_running "sensors modules"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
sensors
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status}"