From 55c15023aa5a1b6e2323f796a2e56a9efbb6cf66 Mon Sep 17 00:00:00 2001 From: XuWei Date: Sun, 13 Aug 2017 21:59:38 -0400 Subject: [PATCH 1/3] fix issue 3668, make rsetboot node do rsetboot stat --- xCAT-server/lib/xcat/plugins/openbmc.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 00ffa21dc..cec5c83c0 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -651,7 +651,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); } @@ -727,7 +727,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"; @@ -750,7 +754,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); } From eb3b720a405ab1521b3acfde7b6b5105d9f1a9d0 Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 16 Aug 2017 22:52:30 -0400 Subject: [PATCH 2/3] modify man page --- .../guides/admin-guides/references/man1/rsetboot.1.rst | 10 +++++++++- xCAT-client/pods/man1/rsetboot.1.pod | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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..735a94c5d 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**\ ] @@ -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..cdec1042b 100644 --- a/xCAT-client/pods/man1/rsetboot.1.pod +++ b/xCAT-client/pods/man1/rsetboot.1.pod @@ -5,7 +5,7 @@ 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>] @@ -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: From da0c0bc0bb5995ae887e12b71576353682b9ae1b Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 23 Aug 2017 21:26:20 -0400 Subject: [PATCH 3/3] modified depending on comments --- docs/source/guides/admin-guides/references/man1/rsetboot.1.rst | 2 +- xCAT-client/pods/man1/rsetboot.1.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 735a94c5d..da5c3876e 100644 --- a/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst @@ -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. ******* diff --git a/xCAT-client/pods/man1/rsetboot.1.pod b/xCAT-client/pods/man1/rsetboot.1.pod index cdec1042b..75a2e9ef7 100644 --- a/xCAT-client/pods/man1/rsetboot.1.pod +++ b/xCAT-client/pods/man1/rsetboot.1.pod @@ -12,7 +12,7 @@ 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