SCO DST script
© March 2007 Raouf Bishay
2007/03/06
Raouf Bishay
I wrote the following script to respond to the 2007 daylight saving problem for SCO UNIX. This will automate the whole process in 5.0.6 and 5.0.7 for all zones. It may need some clean up but here it is anyway.
tail -2 /etc/TIMEZONE > /89
head -1 /89 > /90
cut -c4-10 < /90 > /91
read v2 < /91
uname -a | cut -f4 -d" "> 895
read v1< 895
if test $v1 = 5.0.6
then
head -n15 /etc/TIMEZONE > /RBTIMEZONE
echo "#" Modified By Raouf Bishay 03/01/2007 to correct Time Zone \
>> /RBTIMEZONE
echo TZ="$v2,M3.2.0/2,M11.1.0/2" >>/RBTIMEZONE
echo export TZ >> /RBTIMEZONE
cp /etc/TIMEZONE /etc/TIMEZONE.org
cp /RBTIMEZONE /etc/TIMEZONE
rm /89 /90 /91
reboot
fi
if test $v1 = 5.0.7
then
head -n15 /etc/TIMEZONE > /RBTIMEZONE
echo "#" Modified By Raouf Bishay 03/01/2007 to correct Time Zone \
>> /RBTIMEZONE
read v2 < /91
echo TZ="'$v2,M3.2.0/2,M11.1.0/2'" >> /RBTIMEZONE
echo export TZ >> /RBTIMEZONE
cp /etc/TIMEZONE /etc/TIMEZONE.org
cp /RBTIMEZONE /etc/TIMEZONE
rm /89 /90 /91
reboot
fi
exit
Raouf Bishay
Got something to add? Send me email.
2 comments
Tue Mar 6 18:27:34 2007: 2904 TonyLawrence
As noted elsewhere, SCO has patches for this also..
Mon Mar 12 11:18:04 2012: 10727 TonyLawrence
And see (link)
------------------------
Printer Friendly Version
SCO DST script Copyright © March 2007 Raouf Bishay
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version