summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/pre-auto-gc5
1 files changed, 5 insertions, 0 deletions
diff --git a/hooks/pre-auto-gc b/hooks/pre-auto-gc
index 110e3194..360e5e1f 100755
--- a/hooks/pre-auto-gc
+++ b/hooks/pre-auto-gc
@@ -38,6 +38,11 @@ elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
38 grep -q "Currently drawing from 'AC Power'" 38 grep -q "Currently drawing from 'AC Power'"
39then 39then
40 exit 0 40 exit 0
41elif test -d /sys/bus/acpi/drivers/battery && test 0 = \
42 "$(find /sys/bus/acpi/drivers/battery/ -type l | wc -l)";
43then
44 # No battery exists.
45 exit 0
41fi 46fi
42 47
43echo "Auto packing deferred; not on AC" 48echo "Auto packing deferred; not on AC"