-Have rinv assume 'all' if nothing specified

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1407 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-15 15:06:00 +00:00
parent d05b968cd9
commit 018a0180a0
2 changed files with 7 additions and 1 deletions

View File

@ -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));

View File

@ -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) {