From 55c15023aa5a1b6e2323f796a2e56a9efbb6cf66 Mon Sep 17 00:00:00 2001 From: XuWei Date: Sun, 13 Aug 2017 21:59:38 -0400 Subject: [PATCH] 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); }