Bugzilla – Attachment 62271 Details for
Bug 141958
include fan control in lm_sensors service script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Patch to init.d/lm_sensors and fancontrol
sensors-fancontrol.diff (text/plain), 1.94 KB, created by
Volker Kuhlmann
on 2006-01-08 01:14:54 UTC
(
hide
)
Description:
Patch to init.d/lm_sensors and fancontrol
Filename:
MIME Type:
Creator:
Volker Kuhlmann
Created:
2006-01-08 01:14:54 UTC
Size:
1.94 KB
patch
obsolete
>This patch for SUSE 10.0 changes the lm_sensors service script to also start and >stop the fan control, if fan control is configured. If fan control is not >configured, this patch has no effect. To configure fan control, read the >documentation of package sensors, and run pwmconfig (as root). > >Volker Kuhlmann, 8 Jan 2006 > > > >--- /etc/init.d/lm_sensors.orig 2005-09-13 12:34:49.000000000 +1200 >+++ /etc/init.d/lm_sensors 2006-01-08 13:16:57.000000000 +1300 >@@ -46,6 +46,8 @@ > > CONFIG=/etc/sysconfig/lm_sensors > PSENSORS=/usr/bin/sensors >+FANCONFIG=/etc/fancontrol >+PFAN=/usr/sbin/fancontrol > > # Source function library. > . /etc/rc.status >@@ -59,14 +61,33 @@ > /sbin/modprobe $module &>/dev/null > rc_status > done >- rc_status -v && touch /var/lock/subsys/sensors >+ rc_status && touch /var/lock/subsys/sensors > /usr/bin/sensors -s &> /dev/null >+ >+ # Start fan control, if configured >+ if [ -s "$FANCONFIG" -a -x "$PFAN" ]; then >+ echo -n "starting fan control: " >+ "$PFAN" >/dev/null & >+ echo $! >> /var/lock/subsys/sensors-fan >+ fi >+ >+ rc_status -v > } > > stop() { > echo -n $"Shutting down sensors: " > test -r "$CONFIG" && . "$CONFIG" > >+ # Stop fan control, if it was started >+ if [ -s /var/lock/subsys/sensors-fan ]; then >+ echo -n "stopping fan control: " >+ pid="`cat /var/lock/subsys/sensors-fan`" >+ kill -TERM "$pid" >+ rm /var/lock/subsys/sensors-fan >+ sleep 1 # wait for fancontrol to terminate (any better way?) >+ true >+ fi >+ > for i in ${!MODULE_*} ; do > eval module=\$$i > /sbin/modprobe -r $module &>/dev/null >--- /usr/sbin/fancontrol.orig 2005-09-13 12:34:49.000000000 +1200 >+++ /usr/sbin/fancontrol 2006-01-08 12:50:28.000000000 +1300 >@@ -277,7 +277,10 @@ > while true > do > UpdateFanSpeeds >- sleep $INTERVAL >+ # The sleep in the foreground isn't interruptible by kill, which is >+ # unsuitable for system service scripts. -VK 8Jan06 >+ sleep $INTERVAL & >+ wait $! > done > > # some old stuff/missing features, will clean this up soon
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 141958
: 62271 |
62272
|
62647