Fix no cmd line args bug.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2008-06-25 15:37:19 +00:00
parent be758b3af6
commit 0cd7c5a6a0
3 changed files with 40 additions and 7 deletions

View File

@ -194,7 +194,11 @@ sub processArgs
{
my $gotattrs = 0;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
return 2;
}
if (scalar(@ARGV) <= 0) {
return 2;

View File

@ -172,7 +172,12 @@ sub nimnodeset
# - just set global for now
$::callback=$callback;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
&nimnodeset_usage($callback);
return 0;
}
# parse the options
if(!GetOptions(
@ -532,7 +537,12 @@ sub mknimimage
my $root_name;
my $dump_name;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
&mknimimage_usage($callback);
return 0;
}
# parse the options
Getopt::Long::Configure("no_pass_through");
@ -1622,7 +1632,12 @@ sub rmnimimage
{
my $callback = shift;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
&rmnimimage_usage($callback);
return 0;
}
# parse the options
Getopt::Long::Configure("no_pass_through");
@ -2523,7 +2538,12 @@ sub mkdsklsnode
# - just set global for now
$::callback=$callback;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
&mkdsklsnode_usage($callback);
return 0;
}
# parse the options
if(!GetOptions(
@ -2948,7 +2968,12 @@ sub rmdsklsnode
# - just set global for now
$::callback=$callback;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
&rmdsklsnode_usage($callback);
return 0;
}
# parse the options
if(!GetOptions(

View File

@ -139,7 +139,11 @@ sub processArgs
{
my $gotattrs = 0;
@ARGV = @{$::args};
if (defined(@{$::args})) {
@ARGV = @{$::args};
} else {
return 3;
}
my %ObjTypeHash;