diff options
author | root <root@rshg054.dnsready.net> | 2012-06-12 00:01:37 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-12 00:01:37 +0000 |
commit | 14b46fb49966c5beb34127a600e7be2a04d0821b (patch) | |
tree | 65525e60fb02fa22c1f3acfd99f60d500606f1f8 /staging/lm_sensors/daemonarg.patch | |
parent | 306ac55c1e99cfb5801ef0d9acf2a11d3994d80d (diff) |
Tue Jun 12 00:01:37 UTC 2012
Diffstat (limited to 'staging/lm_sensors/daemonarg.patch')
-rw-r--r-- | staging/lm_sensors/daemonarg.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/staging/lm_sensors/daemonarg.patch b/staging/lm_sensors/daemonarg.patch new file mode 100644 index 000000000..4b80cef19 --- /dev/null +++ b/staging/lm_sensors/daemonarg.patch @@ -0,0 +1,50 @@ +diff -ru lm_sensors-3.1.2-1/prog/pwm/fancontrol lm_sensors-3.1.2-1_pyropeter/usr/sbin/fancontrol +--- lm_sensors-3.1.2-1/prog/pwm/fancontrol 2010-02-03 03:45:15.000000000 +0100 ++++ lm_sensors-3.1.2-1_pyropeter/prog/pwm/fancontrol 2010-03-07 01:37:09.000000000 +0100 +@@ -5,7 +5,9 @@ + # + # Version 0.70 + # +-# Usage: fancontrol [CONFIGFILE] ++# Usage: fancontrol [-D] [CONFIGFILE] ++# ++# (-D causes fancontrol to 'fork' to the background after some tests) + # + # Dependencies: + # bash, egrep, sed, cut, sleep, readlink, lm_sensors :) +@@ -43,6 +45,12 @@ + #DEBUG=1 + MAX=255 + ++DAEMON=0 ++if [ "$1" = "-D" ]; then ++ DAEMON=1 ++ shift ++fi ++ + declare -i pwmval + + function LoadConfig { +@@ -303,7 +311,6 @@ + echo "File $PIDFILE exists, is fancontrol already running?" + exit 1 + fi +-echo $$ > "$PIDFILE" + + # $1 = pwm file name + function pwmdisable() +@@ -475,6 +482,14 @@ + let fcvcount=$fcvcount+1 + done + ++if [ "$DAEMON" -gt 0 ]; then ++ echo "Forking..." ++ $0 $* &> /dev/null & ++ exit 0 ++fi ++ ++echo $$ > "$PIDFILE" ++ + echo 'Starting automatic fan control...' + + # main loop calling the main function at specified intervals |