*do* reboot the boxes, not only display the command
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 25 Jan 2010 09:13:25 +0000 (09:13 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 25 Jan 2010 09:13:25 +0000 (09:13 +0000)
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