diff --git a/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst b/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst index 73f96eaf1..da5c3876e 100644 --- a/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst @@ -11,7 +11,7 @@ SYNOPSIS ******** -\ **rsetboot**\ \ *noderange*\ {\ **hd | net | cd | default | stat**\ } [\ **-u**\ ] [\ **-p**\ ] +\ **rsetboot**\ \ *noderange*\ [\ **hd | net | cd | default | stat**\ ] [\ **-u**\ ] [\ **-p**\ ] \ **rsetboot**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ] @@ -21,7 +21,7 @@ DESCRIPTION *********** -\ **rsetboot**\ sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via rpower(1)|rpower.1), the nodes will return to using the default boot device specified in the BIOS. Currently this command is only supported for IPMI nodes. +\ **rsetboot**\ sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via rpower(1)|rpower.1), the nodes will return to using the default boot device specified in the BIOS. ******* @@ -101,6 +101,14 @@ EXAMPLES rsetboot node[14-56],node[70-203] stat + Or: + + + .. code-block:: perl + + rsetboot node[14-56],node[70-203] + + 3. diff --git a/xCAT-client/pods/man1/rsetboot.1.pod b/xCAT-client/pods/man1/rsetboot.1.pod index c9e6b1fd6..75a2e9ef7 100644 --- a/xCAT-client/pods/man1/rsetboot.1.pod +++ b/xCAT-client/pods/man1/rsetboot.1.pod @@ -5,14 +5,14 @@ B - Sets the boot device to be used for BMC-based servers for the next =head1 SYNOPSIS -B I {B|B|B|B|B} [B<-u>] [B<-p>] +B I [B|B|B|B|B] [B<-u>] [B<-p>] B [B<-h>|B<--help>|B<-v>|B<--version>] =head1 DESCRIPTION -B sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via L), the nodes will return to using the default boot device specified in the BIOS. Currently this command is only supported for IPMI nodes. +B sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via L), the nodes will return to using the default boot device specified in the BIOS. =head1 OPTIONS @@ -64,6 +64,10 @@ Display the next-boot value for nodes 14-56 and 70-203: rsetboot node[14-56],node[70-203] stat +Or: + + rsetboot node[14-56],node[70-203] + =item 3. Restore the next-boot value for these nodes back to their default set in the BIOS: diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 5e91fbac6..86ec9903f 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -664,7 +664,7 @@ sub parse_command_status { my $subcommands = shift; my $subcommand; - if ($$subcommands[-1] =~ /V|verbose/) { + if ($$subcommands[-1] and $$subcommands[-1] =~ /V|verbose/) { $::VERBOSE = 1; pop(@$subcommands); } @@ -740,7 +740,11 @@ sub parse_command_status { } if ($command eq "rsetboot") { - $subcommand = $$subcommands[0]; + if (defined($$subcommands[0])) { + $subcommand = $$subcommands[0]; + } else { + $subcommand = "stat"; + } if ($subcommand =~ /^hd$|^net$|^cd$|^default$|^def$/) { $next_status{LOGIN_RESPONSE} = "RSETBOOT_SET_REQUEST"; $next_status{RSETBOOT_SET_REQUEST} = "RSETBOOT_SET_RESPONSE"; @@ -763,7 +767,7 @@ sub parse_command_status { if ($command eq "reventlog") { my $option_s = 0; - if ($$subcommands[-1] eq "-s") { + if ($$subcommands[-1] and $$subcommands[-1] eq "-s") { $option_s = 1; pop(@$subcommands); }