From 43016e2f4fa2bae4014eb86ff8f56bfe28b3a3b4 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 27 Dec 2010 08:17:12 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 5227b41eb..e11d17498 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -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') {