#!/bin/sh
/usr/bin/alzcheck --main
MAIN=$?
if [ $MAIN = 0 ] ; then
        rm /current/timezo/localtime > /dev/null 2>&1
	ln -s /current/timezo/`grep "\./timezo_./" /current/config.rc | sed -e '2,$d' | cut -d'|' -f3 | cut -d'/' -f3`  /current/timezo/localtime
fi

cd `ls -l /current/timezo | cut -d'>' -f 2`
cd ..
rm localtime > /dev/null 2>&1
if [ $MAIN = 0 ] ; then
	ln -s `pwd`/`grep "\./timezo_./" /current/config.rc | sed -e '2,$d' | cut -d'|' -f3` localtime
else
	TIMEZO=`grep "\./timezo_" /current/config.rc | sed -e '2,$d' | cut -d'|' -f3 | cut -d' ' -f 1`
	ln -s `pwd`/$TIMEZO/localtime localtime
fi
rm /etc/localtime > /dev/null 2>&1
ln -s `pwd`/localtime /etc/localtime
