There are two bugs:
One in power-funcs.sh :
if [ "$?" -eq 0 ]; then STATE="AC"; elif [ "$?" -eq 1 ]; then
This is wrong because the first test [ "$?" -eq 0 ] will change $? . We need to save $? to another variable before testing it. The attached patch does that.
There are two bugs:
One in power-funcs.sh :
if [ "$?" -eq 0 ]; then
STATE= "AC";
elif [ "$?" -eq 1 ]; then
This is wrong because the first test [ "$?" -eq 0 ] will change $? .
We need to save $? to another variable before testing it. The attached patch does that.