From: Alexander Barton Date: Sun, 22 Oct 2017 16:57:47 +0000 (+0200) Subject: Don't indicate error for "no wake" systems X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=trigger-rcmd.git;a=commitdiff_plain;h=70a0278a963eb20be33dc259c508e0571ee02be8 Don't indicate error for "no wake" systems --- diff --git a/scripts/trigger-rcmd b/scripts/trigger-rcmd index 57408c4..ec70d95 100755 --- a/scripts/trigger-rcmd +++ b/scripts/trigger-rcmd @@ -164,7 +164,12 @@ while [ $# -gt 0 ]; do 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