Comment 718 for bug 59695

Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

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.