Linus Torvalds wrote: > I would *seriously* suggest making this soem kind of generic callback and > not Linux-specific. > > How about making it more akin to a pre-auto-gc "hook" - run a script > instead of hardcoding something like this! FWIW, Debian (and I assume Ubuntu also) systems have a on_ac_power script that exits 0 or 1 accordingly. It would be a good thing to point the hook at, or even a good reference when writing your own version of the hook since it also supports /proc/pmu and apm. -- see shy jo