From 14fc9d745ee848d36931169395de05c74a02a6bb Mon Sep 17 00:00:00 2001 From: nott Date: Thu, 9 Apr 2009 17:49:05 +0000 Subject: [PATCH] Move chomp inside conditional git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3158 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index 12dd4b05e..d631aee75 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -137,8 +137,8 @@ if (-f $scriptname) { &runcmd($cmd); my $TZline = $::outref; my ($junk, $tz) = split(/=/, $TZline); - chomp $tz; if ($tz) { + chomp $tz; my $tzcmd = qq~/usr/bin/chtz $tz >/dev/null 2>&1~; if (&runcmd($tzcmd) != 0) { $msg = "$::sdate xcataixpost: Could not set timezone.\n"; @@ -197,8 +197,8 @@ if (-f $scriptname) { &runcmd($cmd); my $PWline = $::outref; my ($junk, $rpd) = split(/=/, $PWline); - chomp $rpd; if ($rpd) { + chomp $rpd; my $pwcmd = qq~echo "root:$rpd" | /bin/chpasswd -c >/dev/null 2>&1~; if (&runcmd($pwcmd) != 0) { $msg = "$::sdate xcataixpost: Could not set password.\n";