fix for bug 3131333: rmdef should not delete all objects if no objects were provided through command line

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8514 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-12-27 08:17:12 +00:00
parent a0f26aebfb
commit 43016e2f4f

View File

@ -652,6 +652,7 @@ sub processArgs
# if there is no other input for object names then we need to
# find all the object names for the specified types
# Do NOT do this for rmdef
if ($::opt_t
&& !( $::opt_o
|| $::filedata
@ -661,6 +662,14 @@ sub processArgs
{
my @tmplist;
if ($::command eq 'rmdef')
{
my $rsp;
$rsp->{data}->[0] =
"No object names were provided.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 2;
}
# also ne chdef ????????
if ($::command ne 'mkdef')
{