APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

SCO DST script


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.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> SCO Unix DST script


2 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Raouf Bishay







Tue Mar 6 18:27:34 2007: 2904   TonyLawrence

gravatar
As noted elsewhere, SCO has patches for this also..





Mon Mar 12 11:18:04 2012: 10727   TonyLawrence

gravatar


And see (link)

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

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





Thunder is good, thunder is impressive; but it is lightning that does the work. (Mark Twain)

Perl: The only language that looks the same before and after RSA encryption. (Keith Bostic)







This post tagged: