From e209b1b7434f6643c9350c0d8fab903c2353a5f3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 24 May 2009 21:08:51 +0200 Subject: check_ac: Actually use $file where appropiate --- etc/functions/check_ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc/functions/check_ac') 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 -- cgit v1.2.3