From 94ba6c8119bfdcc793af0501ab7241287f67ec16 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 27 Apr 2009 03:06:42 +0000 Subject: [PATCH] handle the not initialized warning msg in bypass mode, ref defect 2781882 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3260 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/hosts.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 07ada7fd9..9b5905db1 100644 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -50,7 +50,10 @@ sub build_line { my $node=shift; my $domain=shift; my $othernames=shift; - my @o_names=split(/,| /, $othernames); + my @o_names=(); + if (defined $othernames) { + @o_names=split(/,| /, $othernames); + } my $longname; foreach (@o_names) { if (($_ eq $node) || ( $domain && ($_ eq "$node.$domain"))) { @@ -87,7 +90,8 @@ sub process_request { # parse the options if ($req && $req->{arg}) {@ARGV = @{$req->{arg}};} else { @ARGV = (); } - print "argv=@ARGV\n"; + +# print "argv=@ARGV\n"; if(!GetOptions( 'h|help' => \$HELP, 'n' => \$REMOVE,