Move chomp inside conditional
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3158 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1b798c9b39
commit
14fc9d745e
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user