Power Management and Encryption
    Tom Metro 
    tmetro-blu-5a1Jt6qxUNc at public.gmane.org
       
    Tue May 18 14:38:42 EDT 2010
    
    
  
Daniel Feenberg wrote:
> Further search on google suggests the only way to accomplish this is to 
> write a cron job that periodically consults the "w" command for idle 
> times.
Another option to consider, if you're using a distribution that supports
it, is to hook into an upstart event. Suspend/hibernate are apparently
among the events it handles:
http://lwn.net/Articles/351013/
  The real value of upstart is that it also handles the hibernate and
  suspend processes. Instead of having separate, semi-magical scripts to
  handle the suspend process, upstart uses the same scripts as it would
  if it were shutting down whatever needs to be shut down.
More on upstart here:
http://upstart.ubuntu.com/
though oddly no mention of "suspend" or "hibernate" on it's wiki:
http://upstart.ubuntu.com/wiki/
I guess they don't enumerate the common signals it handles.
 -Tom
-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
    
    
More information about the Discuss
mailing list