fix a user reported problem for updatenode usage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8103 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8250352188
commit
1eaebfd18f
@ -28,26 +28,13 @@ if (-p STDIN) {
|
||||
while ( <STDIN> ) { $data.=$_; }
|
||||
$cmdref->{stdin}->[0]=$data;
|
||||
}
|
||||
|
||||
Getopt::Long::Configure("posix_default");
|
||||
Getopt::Long::Configure("no_gnu_compat");
|
||||
Getopt::Long::Configure("bundling");
|
||||
GetOptions('h|help' => \$::HELP,
|
||||
'v|version' => \$::VERSION);
|
||||
#GetOptions('h|help' => \$::HELP,
|
||||
# 'v|version' => \$::VERSION);
|
||||
# display the usage if -h or --help is specified
|
||||
if ($::HELP)
|
||||
{
|
||||
&updatenode_usage($callback);
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# display the version statement if -v or --verison is specified
|
||||
if ($::VERSION)
|
||||
{
|
||||
my $version = xCAT::Utils->Version();
|
||||
print "$version\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
my $arg=shift(@ARGV);
|
||||
|
||||
@ -100,6 +87,20 @@ if (
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($::HELP)
|
||||
{
|
||||
&updatenode_usage($callback);
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# display the version statement if -v or --verison is specified
|
||||
if ($::VERSION)
|
||||
{
|
||||
my $version = xCAT::Utils->Version();
|
||||
print "$version\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
my $current_userid = getpwuid($>);
|
||||
$ENV{DSH_FROM_USERID} = $current_userid;
|
||||
my $to_userid;
|
||||
|
Loading…
Reference in New Issue
Block a user