]> arthur.barton.de Git - trigger-rcmd.git/commitdiff
Don't indicate error for "no wake" systems
authorAlexander Barton <alex@barton.de>
Sun, 22 Oct 2017 16:57:47 +0000 (18:57 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 22 Oct 2017 16:57:47 +0000 (18:57 +0200)
scripts/trigger-rcmd

index 57408c40d870620e017edf4253605a39390b61b6..ec70d958f2864ae3c42912115fbbccb615d3bb4f 100755 (executable)
@@ -164,7 +164,12 @@ while [ $# -gt 0 ]; do
                fi
                NAME=$BASENAME
        fi
                fi
                NAME=$BASENAME
        fi
-       [ $r -ne 0 ] && result=1
+       if [ $r -ne 0 ]; then
+               # Exit code indicates an error. But only flag this as error
+               # when target should have been woken up and the indicated error
+               # is not "system down" (9).
+               [ -z "$NO_WAKE" ] || [ $r -ne 9 ] && result=1
+       fi
        shift
        [ $# -gt 0 ] && echo
 done
        shift
        [ $# -gt 0 ] && echo
 done