summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-24 21:08:51 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-24 21:08:51 +0200
commite209b1b7434f6643c9350c0d8fab903c2353a5f3 (patch)
tree8d2b33249c7ad4b5511bd435cc8f58e6e7cf2a8e
parent41be131dd0917bef70cd83b7db17c6a0cd9f9a4a (diff)
check_ac: Actually use $file where appropiate
-rw-r--r--etc/functions/check_ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/functions/check_ac b/etc/functions/check_ac
index 429ed3f..d97d7da 100644
--- a/etc/functions/check_ac
+++ b/etc/functions/check_ac
@@ -2,7 +2,7 @@
## check_ac - returns true if machine is running on AC
typeset file=/sys/class/power_supply/AC/online
if [[ -f $file ]] {
- [[ $(cat /sys/class/power_supply/AC/online) == 1 ]]
+ [[ $(cat $file) == 1 ]]
return $?
}
return 0