2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

fix issue [FVT]Please update the 'chdef template' return message #1440

This commit is contained in:
immarvin
2016-06-30 22:52:06 -04:00
parent cfc2fab856
commit 44506cbfe0

View File

@ -604,6 +604,14 @@ sub processArgs
return 2;
}
#"--template" can only be used with "mkdef" and "lsdef" command
if(defined $::opt_template && ($::command ne "mkdef" && $::command ne "lsdef")){
my $rsp;
$rsp->{data}->[0] = "The option \'--template\' can not be used with \'$::command\'.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 2;
}
#it is illegal to specify no object template for "mkdef --template",
if($::command eq "mkdef" and defined $::opt_template and !$::opt_template){
my $rsp;