From 38055b76f886e209aa85531d2c31fbc51580cef8 Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" <stoller@flux.utah.edu> Date: Tue, 3 Aug 2004 23:42:07 +0000 Subject: [PATCH] Minor change to usage statement. Add explicit -w option to wait for node to reboot. --- utils/node_admin.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/utils/node_admin.in b/utils/node_admin.in index 5ecfe0459b..60c61cdd90 100755 --- a/utils/node_admin.in +++ b/utils/node_admin.in @@ -2,7 +2,7 @@ # # EMULAB-COPYRIGHT -# Copyright (c) 2000-2003 University of Utah and the Flux Group. +# Copyright (c) 2000-2004 University of Utah and the Flux Group. # All rights reserved. # @@ -14,12 +14,13 @@ use Getopt::Std; # sub usage() { - print STDOUT "Usage: nodeadmin [-h] [-n] <on | off> <node>\n"; + print STDOUT "Usage: nodeadmin [-h] [-n | -w] <on | off> <node>\n"; print STDOUT "-h This message\n"; - print STDOUT "-n Don't reboot nodes\n"; + print STDOUT "-n Do not reboot node\n"; + print STDOUT "-w Wait for node to come back up if rebooted\n"; exit(-1); } -my $optlist = "hn"; +my $optlist = "hnw"; # # Configure variables @@ -121,7 +122,9 @@ DBQueryFatal("update nodes set startupcmd='', startstatus='none' ". # Reboot node # if (!$options{n}) { - if (system("$nodereboot", "$node")) { + my $optarg = ($options{"w"} ? "-w" : ""); + + if (system("$nodereboot $optarg $node")) { die("*** $0:\n". " WARNING: Could not reboot $node.\n"); } -- GitLab