From 913873430c28a825513859e3e32bbfa5c820957d Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 31 Jan 2018 16:39:19 -0500 Subject: [PATCH] Handle update files with - in the path --- xCAT-server/lib/xcat/plugins/openbmc.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 658dee13c..77516b813 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1850,23 +1850,23 @@ sub parse_command_status { my $nohost_reboot = 0; foreach $subcommand (@$subcommands) { - if ($subcommand =~ /-c|--check/) { + if ($subcommand =~ /^-c|^--check/) { $check_version = 1; - } elsif ($subcommand =~ /-l|--list/) { + } elsif ($subcommand =~ /^-l|^--list/) { $list = 1; - } elsif ($subcommand =~ /--delete/) { + } elsif ($subcommand =~ /^--delete/) { $delete = 1; - } elsif ($subcommand =~ /-u|--upload/) { + } elsif ($subcommand =~ /^-u|^--upload/) { $upload = 1; - } elsif ($subcommand =~ /-a|--activate/) { + } elsif ($subcommand =~ /^-a|^--activate/) { $activate = 1; - } elsif ($subcommand =~ /-d/) { + } elsif ($subcommand =~ /^-d/) { my $check = unsupported($callback); if (ref($check) eq "ARRAY") { xCAT::SvrUtils::sendmsg($check, $callback); return 1; } $streamline = 1; - } elsif ($subcommand =~ /--no-host-reboot/) { + } elsif ($subcommand =~ /^--no-host-reboot/) { $nohost_reboot = 1; } else { $update_file = $subcommand;