diff --git a/xCAT-client/bin/updatenode b/xCAT-client/bin/updatenode index 7fb5cd3e6..5ce3fbe83 100755 --- a/xCAT-client/bin/updatenode +++ b/xCAT-client/bin/updatenode @@ -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($>); diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index f16ce025b..a43280ba8 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -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; }