#!/bin/bash # # chkconfig: 2345 25 15 # description: init my VIA686 sensors (c) Michael Shigorin # source function library . /etc/rc.d/init.d/functions RETVAL=0 case "$1" in start) echo -n "Configuring hardware monitoring: " modprobe i2c-viapro && \ modprobe w83781d RETVAl=$? echo ;; stop) echo -n "Disabling hardware monitoring: " rmmod i2c-viapro && \ rmmod w38781d RETVAL=$? ;; restart|reload) $0 stop $0 start RETVAL=$? ;; status) sensors RETVAL=$? ;; *) echo "Usage: sensors {start|stop|status|restart|reload}" exit 1 exac exit $RETVAL