|
From: <rap...@us...> - 2003-11-28 00:03:34
|
Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv16821/scripts/scripts
Added Files:
lm_sensors
Log Message:
lm-sensors init script
--- NEW FILE: lm_sensors ---
#!/bin/bash
#
# Example setup for the lm-sensors package. You have to run
# /usr/sbin/sensors-detect and have perl support to discover
# what modules are needed on your system.
#
### BEGIN INIT INFO
# Provides: lm_sensors
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 6
# Description: starts lm_sensors
### END INIT INFO
NAME="lm_sensors"
# settings
source /etc/sysconfig/config
# parameters
# source function library
source /etc/init.d/functions
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
case "$1" in
start)
#
# mandatory modules
#
#/sbin/modprobe i2c-dev
#/sbin/modprobe i2c-isa
#/sbin/modprobe i2c-proc
#
# hardware depending modules
#
#/sbin/modprobe i2c-viapro
#/sbin/modprobe vt1211
#/sbin/modprobe eeprom
# And reset the sensor info
/usr/bin/sensors -s
# needed example config for the epia6000+ motherboard
# echo "123.0 128.0 0.0" > /proc/sys/dev/sensors/vt1211-isa-6000/temp3
;;
stop)
#
# undo :)
#
#/sbin/rmmod eeprom
#/sbin/rmmod i2c-viapro
#/sbin/rmmod i2c-isa
#/sbin/rmmod vt1211
#/sbin/rmmod i2c-proc
#/sbin/rmmod i2c-core
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
|