#!/bin/sh
#
# trigger-rcmp: Trigger remote commands
-# Copyright (c)2014-2016 Alexander Barton (alex@barton.de)
+# Copyright (c)2014-2017 Alexander Barton (alex@barton.de)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
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