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
This commit is contained in:
lissav 2012-08-20 20:52:20 +00:00
parent 9959367888
commit e42b3dc34a

View File

@ -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