Commit eda84439 authored by Daniel Graziotin's avatar Daniel Graziotin

Fixes #26

parent ac4178b3
......@@ -19,7 +19,7 @@ This enhanced version assumes any number of processors and fans (max. 10).
Supported GNU/Linux Distributions
---------------------------------
We provide scripts to to load mbpfan daemon at system boot for many distros.
Please note that the support is provided by volunteers. mbpfan needs test and bug reports.
Please note that the support is provided by volunteers. mbpfan needs tests and bug reports.
Supported distributions:
......
......@@ -12,15 +12,4 @@ umask 022
console log
pre-start script
test -x /usr/sbin/mbpfan || { stop; exit 0; }
# A way to turn pidfile writing off would be nice. That or mbpfan
# could check for staleness before refusing to control your fans.
rm -f /var/run/mbpfan.pid
end script
# Starting mbpfan in the foreground without being in an interactive tty currently
# seems to segfault, so expect forkage.
expect fork
exec /usr/sbin/mbpfan
exec /usr/sbin/mbpfan -f
......@@ -87,6 +87,11 @@ void signal_handler(int signal)
delete_pid();
//TODO: free resources
exit(0);
case SIGSTOP:
syslog(LOG_WARNING, "Received SIGSTOP signal.");
delete_pid();
//TODO: free resources
exit(0);
default:
syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal));
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment