threads / patch / 15894

patchAdd Linux PPC support to the pre-auto-gc example hook

Subject: [PATCH] Add Linux PPC support to the pre-auto-gc example hook

## tl;dr

One message between Oct 14, 2008 and Oct 14, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Miklos Vajna· Oct 14, 2008, 14:42 UTC · lore
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 contrib/hooks/pre-auto-gc-battery |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Show changes to contrib/hooks/pre-auto-gc-battery +3 −0
diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
index b0a8caa..1f914c9 100644
--- a/contrib/hooks/pre-auto-gc-battery
+++ b/contrib/hooks/pre-auto-gc-battery
@@ -30,6 +30,9 @@ then
 elif grep -q '0x01$' /proc/apm 2>/dev/null
 then
 	exit 0
+elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
+then
+	exit 0
 elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
 	grep -q "Currently drawing from 'AC Power'"
 then
-- 
1.6.0.2

← back to recent threads