diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-05-24 21:08:51 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-05-24 21:08:51 +0200 |
commit | e209b1b7434f6643c9350c0d8fab903c2353a5f3 (patch) | |
tree | 8d2b33249c7ad4b5511bd435cc8f58e6e7cf2a8e /etc/functions/check_ac | |
parent | 41be131dd0917bef70cd83b7db17c6a0cd9f9a4a (diff) |
check_ac: Actually use $file where appropiate
Diffstat (limited to 'etc/functions/check_ac')
-rw-r--r-- | etc/functions/check_ac | 2 |
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 |