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 |
From: Heiko Z. <he...@zu...> - 2003-11-28 15:21:20
|
> 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 Would be great if you could put this stuff into a config variable LMSENSORS_MODULES or so to /etc/sysconfig/config . Take a look at our linuxrc script, there you see how to handle the loading. -- Regards Heiko Zuerker http://www.devil-linux.org |
From: Diego T. <dt...@co...> - 2003-11-28 16:34:28
|
On Fri, Nov 28, 2003 at 10:16:16AM -0500, Heiko Zuerker wrote: > > #/sbin/modprobe i2c-dev > > #/sbin/modprobe i2c-isa > > #/sbin/modprobe eeprom > > Would be great if you could put this stuff into a config variable > LMSENSORS_MODULES or so to /etc/sysconfig/config . better, of course :) i'll look at it... -- -- gnupg keyfingerprint -- 48AF 5BF9 8F54 2966 64CC 2327 7CD0 DD91 B09D 5799 -- Use of a keyboard or mouse may be linked to serious injuries or disorders. Diego Torres - dt...@co... - Madrid / España |
From: Diego T. <dt...@co...> - 2003-11-28 17:47:40
|
On Fri, Nov 28, 2003 at 10:16:16AM -0500, Heiko Zuerker wrote: > > #/sbin/modprobe i2c-viapro > > #/sbin/modprobe vt1211 > > #/sbin/modprobe eeprom > > Would be great if you could put this stuff into a config variable > LMSENSORS_MODULES or so to /etc/sysconfig/config . > Take a look at our linuxrc script, there you see how to handle the loading. I was thinking... we don't need to load them at the linuxrc script. why? they're modules that aren't vital, neither the system needs them to boot. and if we're listing them in some place, better to create a /etc/modules where all the modules should be placed. in the other hand, if we have to configure them in some place, better to be at the init script of lm-sensors, so they're kept in a related place. -- -- gnupg keyfingerprint -- 48AF 5BF9 8F54 2966 64CC 2327 7CD0 DD91 B09D 5799 -- Use of a keyboard or mouse may be linked to serious injuries or disorders. Diego Torres - dt...@co... - Madrid / España |
From: Heiko Z. <he...@zu...> - 2003-11-30 15:21:23
|
> On Fri, Nov 28, 2003 at 10:16:16AM -0500, Heiko Zuerker wrote: >> > #/sbin/modprobe i2c-viapro >> > #/sbin/modprobe vt1211 >> > #/sbin/modprobe eeprom >> >> Would be great if you could put this stuff into a config variable >> LMSENSORS_MODULES or so to /etc/sysconfig/config . >> Take a look at our linuxrc script, there you see how to handle the >> loading. > > I was thinking... we don't need to load them at the linuxrc script. why? > > they're modules that aren't vital, neither the system needs them to boot. > > and if we're listing them in some place, better to create a /etc/modules > where > all the modules should be placed. in the other hand, if we have to > configure > them in some place, better to be at the init script of lm-sensors, so > they're > kept in a related place. That was actually what I meant. I just wanted to tell you that you just need to cut'n'paste the part out of linuxrc (inventing the wheel only once). -- Regards Heiko Zuerker http://www.devil-linux.org |