$ sudo /usr/sbin/pmi action suspend force ; echo $? > result $ cat result 0
^^ works fine, but without the sudo (the 'cat' is to stop 'su' asking for passwords...) then the following fails, but still cleanly exits:
$ cat | /usr/sbin/pmi action suspend force ; echo $? > result $ cat result 0
$ sudo /usr/sbin/pmi action suspend force ; echo $? > result
$ cat result
0
^^ works fine, but without the sudo (the 'cat' is to stop 'su' asking for passwords...) then the following fails, but still cleanly exits:
$ cat | /usr/sbin/pmi action suspend force ; echo $? > result
$ cat result
0