Be quiet when issuing shutdown(8) command
authorAlexander Barton <alex@barton.de>
Mon, 24 Nov 2014 19:13:12 +0000 (20:13 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 24 Nov 2014 19:13:12 +0000 (20:13 +0100)
scripts/trigger-rcmd

index c21a21f55103bdca0484092b81660181445f4fb0..b0c1aa9b2d3e4d2ea4dd299e61bbd8fd068d88bd 100755 (executable)
@@ -88,7 +88,7 @@ do_rcmd() {
                rsys_users=`ssh -q "$SYSTEM" w | tail -n +3 | wc -l`
                if [ "$rsys_users" = "0" ]; then
                        echo "$NAME: power off \"$SYSTEM\" again ..."
                rsys_users=`ssh -q "$SYSTEM" w | tail -n +3 | wc -l`
                if [ "$rsys_users" = "0" ]; then
                        echo "$NAME: power off \"$SYSTEM\" again ..."
-                       ssh -q "$SYSTEM" "sync; shutdown -hP +1"
+                       ssh -q "$SYSTEM" "sync; shutdown -hP +1" >/dev/null
                        if [ $? -ne 0 ]; then
                                echo "$NAME: failed to power off \"$SYSTEM\"!" >&2
                                return 5
                        if [ $? -ne 0 ]; then
                                echo "$NAME: failed to power off \"$SYSTEM\"!" >&2
                                return 5