From 2ecf1cd9f01feca1168314a18b0341c711f2c20a Mon Sep 17 00:00:00 2001 From: lissav Date: Sun, 22 Apr 2012 10:17:43 +0000 Subject: [PATCH] change globals in tabch git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12292 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 1b58efd79..3c6c2c373 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -2047,13 +2047,15 @@ if (!defined($req->{arg})) { $tabch_usage->(1); return; } # options can be bundled up like -vV Getopt::Long::Configure("bundling"); $Getopt::Long::ignorecase = 0; - +my $delete; +my $help; +my $version; # parse the options if ( !GetOptions( - 'd|delete' => \$::DELETE, - 'h|help' => \$::HELP, - 'v|version' => \$::VERSION, + 'd|delete' => \$delete, + 'h|help' => \$help, + 'v|version' => \$version, ) ) { @@ -2061,10 +2063,10 @@ if ( return; } -if ($::HELP) { $tabch_usage->(0); return; } +if ($help) { $tabch_usage->(0); return; } # display the version statement if -v or --verison is specified -if ($::VERSION) +if ($version) { my %rsp; my $version = xCAT::Utils->Version(); @@ -2107,7 +2109,7 @@ else unshift(@ARGV, $target); } -if ($::DELETE) +if ($delete) { #delete option is specified