From e431f7d9eb79d6dca2db072f42af945ebe75cd75 Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 30 Mar 2009 02:52:44 +0000 Subject: [PATCH] add "Missing table name", fix bug2509834 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3038 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/chtab | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/sbin/chtab b/xCAT-server/sbin/chtab index eafe6564e..ac89afd71 100755 --- a/xCAT-server/sbin/chtab +++ b/xCAT-server/sbin/chtab @@ -77,6 +77,11 @@ if ($keypairs[0] !~ /([^\.\=]+)\.([^\.\=]+)\=(.+)/) { if ($::DELETE) { #delete option is specified my @tables_to_del=@ARGV; + if(@tables_to_del == 0) { + print "Missing table name.\n"; + usage; + exit(1); + } for (@tables_to_del) { $tables{$_} = xCAT::Table->new($_,-create => 1,-autocommit => 0); $tables{$_}->delEntries(\%keyhash);