From: havner Date: Mon, 24 Jul 2006 16:12:17 +0000 (+0000) Subject: - simpler odd/even check X-Git-Tag: auto/ac/acpid-1_0_4-5~3 X-Git-Url: http://git.pld-linux.org/?p=packages%2Facpid.git;a=commitdiff_plain;h=3155fdafd4b67e3f539197450d11c03c294df2a7 - simpler odd/even check Changed files: acpid.button.sh -> 1.3 --- diff --git a/acpid.button.sh b/acpid.button.sh index 02d7864..d606bfc 100644 --- a/acpid.button.sh +++ b/acpid.button.sh @@ -31,9 +31,8 @@ case "$1" in # if you want to specify separate commands for # lid open/close uncomment this section: - #NUMBER=`printf "%d" "0x$4"` - #EVEN=`dc -e "1 k $NUMBER 2 / p" | grep "\.0"` - #if [ ! "$EVEN" ]; then + #ODD=`echo $4 | grep "1$\|3$\|5$\|7$\|9\|b$\|d$\|f$"` + #if [ "$ODD" ]; then # logger "acpid: lid close action is not defined" #else # logger "acpid: lid open action is not defined"