diff --git a/xCAT-server-2.0/lib/xcat/plugins/blade.pm b/xCAT-server-2.0/lib/xcat/plugins/blade.pm index b7a4189f9..a9773f9ed 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/blade.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/blade.pm @@ -912,6 +912,9 @@ sub inv { push @invitems,split( /,/,$_); } my $item; + unless (scalar(@invitems)) { + @invitems = ("all"); + } while (my $item = shift @invitems) { if ($item =~ /^all/) { push @invitems,(qw(mtm serial mac firm)); diff --git a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm index 249938eda..aed500ec5 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm @@ -1454,6 +1454,9 @@ sub inv { return($rc,$text); } + unless ($subcommand) { + $subcommand = "all"; + } if($subcommand eq "all") { @types = qw(model serial deviceid mprom guid); } @@ -1479,7 +1482,7 @@ sub inv { @types = qw(guid); } else { - return(1,"unsupported command inv $subcommand"); + return(1,"unsupported BMC inv argument $subcommand"); } foreach(@types) {