Introduce a delay for freshly booted systems
authorAlexander Barton <alex@barton.de>
Sat, 29 Nov 2014 15:32:35 +0000 (16:32 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 29 Nov 2014 15:32:35 +0000 (16:32 +0100)
scripts/trigger-rcmd

index a3ae03d..9c23ae0 100755 (executable)
@@ -27,6 +27,7 @@ do_rcmd() {
        TIMEOUT="180"
        SSH_CHECKS="6"
        WAKE_DELAY="10s"
+       BOOT_DELAY="1m"
        SHUTDOWN_TIME="+10"
 
        . "$cnf"
@@ -78,6 +79,11 @@ do_rcmd() {
        done
        echo "$NAME: ok, SSH seems to be available on \"$SYSTEM\"."
 
+       if [ "$rsys_was_running" -eq 0 ]; then
+               echo "$NAME: \"$SYSTEM\" just started up. Delaying actions for $BOOT_DELAY ..."
+               sleep "$BOOT_DELAY"
+       fi
+
        echo "$NAME: calling \"$CMD\" on \"$SYSTEM\" ..."
        echo