From d91af1c001fa3fbb601c36afcb6fb718f9f7e48c Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 21 Aug 2012 11:11:58 +0000 Subject: [PATCH] fix defect 3558801 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index 53a5ead06..40116e859 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -7,9 +7,10 @@ # This script is run from the /etc/inittab file on both # diskless and diskfull AIX nodes # -# It is also run by the updatenode cmd ( -c 1) +# It is also run by the updatenode cmd ( -c 1) for -P +# updatenode cmd ( -c 5) for -k # moncfg command (-c 3) -# +# Install no arguments ( see aixinstall.pm) ##################################################### # if AIX - make sure we include perl 5.8.2 in INC path. @@ -237,8 +238,9 @@ if (&runcmd($chcmd) != 0) { print "$::sdate xcataixpost: Could not change /xcatpost file permissions.\n"; print $::LOG_FILE "$::sdate xcataixpost: Could not change /xcatpost file permissions.\n"; } - -if (-f $scriptname) { +# set TZ only on install +if (@ARGV==0) { + if (-f $scriptname) { # set the timezone my $cmd = "cat $scriptname | grep 'TIMEZONE='"; &runcmd($cmd); @@ -251,9 +253,10 @@ if (-f $scriptname) { 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