Re: [PATCH] git gc --auto: defer on battery
- From
Joey Hess <joey@kitenet.net>
- Date
- Mar 31, 2008, 18:08 UTC
- Message-ID
- <20080331180831.GA14916@kodama.kitenet.net>
- In-Reply-To
- <alpine.LFD.1.00.0803301645020.14670@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 5 quoted lines
> 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