2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 01:26:38 +00:00

Merge pull request #527 from penguhyang/updatenode_zero

fix issue: return values are zero for updatenode -f with incompatiable flags -k,-S,-P
This commit is contained in:
yangsong 2015-12-18 15:50:40 +08:00
commit 0afeb8ccc5
2 changed files with 11 additions and 3 deletions

View File

@ -142,6 +142,12 @@ if (($SECURITY) && (($SWMAINTENANCE) || defined($RERUNPS) || ($FILESYNC) || ($SN
exit 1;
}
if ($SNFILESYNC && ($SWMAINTENANCE || defined($RERUNPS) || $SECURITY || $FILESYNC)){
my $msg = "If you specify the -f flag you must not specify either the -S or -k or -P or -F flags";
xCAT::MsgUtils->message("E", $msg);
exit 1;
}
# determine who is running the command on the client and who we will run as
# on the node
my $current_userid = getpwuid($>);

View File

@ -387,6 +387,7 @@ sub preprocess_updatenode
{
my $rsp = {};
$rsp->{data}->[0] = "You can not specify both the -f and -F flags.";
$rsp->{errorcode}->[0] =1;
$callback->($rsp);
return;
}
@ -395,8 +396,8 @@ sub preprocess_updatenode
{
my $rsp = {};
$rsp->{data}->[0] =
"If you specify the -f flag you must not specify either the -S or -k or -P or -F
flags";
"If you specify the -f flag you must not specify either the -S or -k or -P or -F flags";
$rsp->{errorcode}->[0] =1;
$callback->($rsp);
return;
}
@ -407,7 +408,8 @@ sub preprocess_updatenode
{
my $rsp = {};
$rsp->{data}->[0] =
"If you use the -k flag, you cannot specify the -S,-P,-f or -F flags.";
"If you use the -k flag, you cannot specify the -S,-P,-f or -F flags.";
$rsp->{errorcode}->[0] =1;
$callback->($rsp);
return;
}