Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#18177 - [lm_sensors] fancontrol daemon won't report failure
Attached to Project:
Arch Linux
Opened by Pericles (watsonalgas) - Friday, 05 February 2010, 12:57 GMT
Last edited by Dan Griffiths (Ghost1227) - Monday, 10 May 2010, 20:37 GMT
Opened by Pericles (watsonalgas) - Friday, 05 February 2010, 12:57 GMT
Last edited by Dan Griffiths (Ghost1227) - Monday, 10 May 2010, 20:37 GMT
|
DetailsDescription:
I reported the fancontrol Additional info: * package version -- 3.1.2-1 Steps to reproduce: If you upgrade lm_sensors, and run fancontrol without updating your /etc/fancontrol config, the daemon will run but fancontrol itself will fail to run. |
This task depends upon
Replace:
[ -z "$PID" ] && /usr/sbin/fancontrol >/dev/null 2>&1 &
if [ $? -gt 0 ]; then
by:
[ -z "$PID" ] && /usr/sbin/fancontrol >/dev/null 2>&1 &
if [ $? -gt 0 -o -z "$PID" ]; then
[ -z "$PID" ] && /usr/sbin/fancontrol >/dev/null 2>&1 &
if [ -z "$PID" -o $? -gt 0 ]; then
-------
if [ $? -gt 0 -o -n "$PID" ] ; then
-------
But it does not output a "fail" if fancontrol actually fails. (This is caused by starting the deamon in the background, which makes it impossible to determine its exit-status)
The only good way to fix this is to modify the fancontrol script.
It should get a "-d" argument, which makes it start, run all checks, then crash and return >0, or fork to the background. (I don't have a clue if bash is capable of forking in a script, but as a workaround it could re-call itself in the background and exit. the second instance should most likely find valid working conditions.)
Its just a kind of POC and not tested very well.
My current initscript using the patched fancontrol looks like this:
------
PID=$(pidof -o %PPID -x /usr/sbin/fancontrol2)
case "$1" in
start)
stat_busy "Starting fancontrol"
[ -z "$PID" ] && /usr/sbin/fancontrol2 -D &>/dev/null
if [ $? -gt 0 -o -n "$PID" ] ; then
------
Attached is an improvment of the above posted patch. (It also covers the initscript)