Comment 69 for bug 223825

Revision history for this message
Caleb Callaway (enlightened-despot) wrote :

Further refinements: while testing, I discovered that the AICCU daemon terminates when the system hibernates. This is not an Upstart behavior as far as I can tell, because removing the "stop on" clause does not change the behavior. The AICCU log simply says "Killed", so I suspect it's responding to a low-level SIGTERM signal or such.

No big deal, except neither the "local-filesystems" or the "runlevel" events are emitted by Upstart when the system resumes. As a result, rev 3 of the script will not restart the AICCU daemon when the system comes out of hibernation. Clint's "or runlevel [2345]" recommendation doesn't aid us either.

This seems like a fairly common scenario (I find AICCU to be most useful on my laptop). I'm unable to find any documentation on what sort of signals are emitted by Upstart when a system comes out of hibernation, so I've resorted to this simplified "start on" clause: "start on net-device-up IFACE!=lo".

Unfortunately, this start condition leaves us without a strong guarantee that local filesystems are available. So, I added a sanity check to the pre-start script that will bail out if the log file is untouchable.

This is the only way I know of to restart the daemon when the system comes out of hibernation. I'm wide open to suggestions on better way to handle the situation.

Revised script is attached.