*do* reboot the boxes, not only display the command
[infrastructure.git] / scripts / reboot-all.sh
index 276b801..c0e70b8 100755 (executable)
@@ -60,9 +60,10 @@ function host_detail () {
 for box in $BOXES; do
     msg=$(host ${box}.onelab.eu | grep alias)
     echo "==================== rebooting ${box}.onelab.eu ($msg)"
+    command="ssh root@${box}.onelab.eu shutdown -r now"
     if [ -n "$DRY_RUN" ] ; then
-       echo DRYRUN: echo ssh root@${box}.onelab.eu shutdown -r now
+       echo DRYRUN: $command
     else
-       echo ssh root@${box}.onelab.eu shutdown -r now
+       $command
     fi
 done