Changeset 5180

Show
Ignore:
Timestamp:
04/16/08 16:29:01 (6 years ago)
Author:
khali
Message:

pwmconfig: Don't start if fancontrol is running.
fancontrol: Don't start if already running, delete fancontrol.pid at
exit time.
This closes ticket #2299.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5179 r5180  
    1010             Don't preserve configuration file customizations 
    1111             Fix permissions of the configuration file 
     12             Don't start if fancontrol is running (#2299) 
     13  fancontrol: Don't start if already running (#2299) 
     14              Delete fancontrol.pid at exit time (#2299) 
    1215  sensors-detect: Add SMSC SCH5027D detection 
    1316                  Do not access I/O ports on PPC 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/init/fancontrol.init

    r2607 r5180  
    3535   killproc $FANCONTROL 
    3636   RETVAL=$? 
    37    rm -f $PIDFILE 
    3837   rm -f /var/lock/subsys/fancontrol 
    3938   echo 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol

    r5163 r5180  
    2323# 
    2424#    Copyright 2003 Marius Reiner <marius.reiner@hdev.de> 
    25 #    Copyright (C) 2007 Jean Delvare <khali@linux-fr.org> 
     25#    Copyright (C) 2007-2008 Jean Delvare <khali@linux-fr.org> 
    2626# 
    2727#    This program is free software; you can redistribute it and/or modify 
     
    4242# 
    4343 
     44PIDFILE="/var/run/fancontrol.pid" 
     45 
    4446#DEBUG=1 
    4547MAX=255 
    4648 
    47 echo $$ > /var/run/fancontrol.pid 
     49if [ -f "$PIDFILE" ] 
     50then 
     51        echo "File $PIDFILE exists, is fancontrol already running?" 
     52        exit 1 
     53fi 
     54echo $$ > "$PIDFILE" 
    4855 
    4956declare -i pwmval 
     
    249256        done 
    250257        echo 'Verify fans have returned to full speed' 
     258        rm -f "$PIDFILE" 
    251259        exit $status 
    252260} 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig

    r5179 r5180  
    2828# 
    2929# 
     30 
     31PIDFILE="/var/run/fancontrol.pid" 
     32 
     33if [ -f "$PIDFILE" ] 
     34then 
     35        echo "File $PIDFILE exists. This typically means that the" 
     36        echo "fancontrol deamon is running. You should stop it before running pwmconfig." 
     37        echo "If you are certain that fancontrol is not running, then you can delete" 
     38        echo "$PIDFILE manually." 
     39        exit 1 
     40fi 
     41 
    3042echo 'This program will search your sensors for pulse width modulation (pwm)' 
    3143echo 'controls, and test each one to see if it controls a fan on'