From e42b3dc34a3b3cca504f9445c2ddec04b2da4964 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 20 Aug 2012 20:52:20 +0000 Subject: [PATCH] backup change until see how many way called git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index 091f5026b..53a5ead06 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -239,26 +239,21 @@ if (&runcmd($chcmd) != 0) { } if (-f $scriptname) { - # if called by updatenode do not change TZ - if (@ARGV > 0) { - if ($ARGV[0] != 1 && $ARGV[0] != 2) { # set the timezone - my $cmd = "cat $scriptname | grep 'TIMEZONE='"; - &runcmd($cmd); - my $TZline = $::outref; - my ($junk, $tz) = split(/=/, $TZline); - if ($tz) { + my $cmd = "cat $scriptname | grep 'TIMEZONE='"; + &runcmd($cmd); + my $TZline = $::outref; + my ($junk, $tz) = split(/=/, $TZline); + if ($tz) { chomp $tz; my $tzcmd = qq~/usr/bin/chtz $tz >/dev/null 2>&1~; if (&runcmd($tzcmd) != 0) { my $msg = "$::sdate xcataixpost: Could not set timezone.\n"; `logger -t xcat -p local4.warning $msg`; } else { - &runcmd("export TZ=$tz"); - } - } + &runcmd("export TZ=$tz"); + } } - } } # check & run the postscript