Lonnie Abelbeck wrote:
> Darrick,
>
> I have just started to look at 0.4.2 (long time 0.3.0 user).
> It appears to me that setting TIMEZONE in rc.conf does nothing.
>
> I solved the timezone problem as follows:
>
> rc.conf:  # added TIMEZONE_TZ variable after TIMEZONE variable
> TIMEZONE_TZ=CST6CDT
>
> /etc/init.d/misc:  # added below the init() { line
> if [ "$TIMEZONE_TZ" ]
> then
> echo "$TIMEZONE_TZ" > /tmp/etc/TZ
> fi
>
> This works for me.
> If there is a better way, you won't hurt my feelings
>
> Lonnie
>
>   

Lonnie,

I see what the problem is.  If you look in /etc/rc the section that 
reads the $TIMEZONE variable is in the wrong place.  It should be 
switched with the section right below it.  I removed the section that 
reads the variable from /stat/etc/TZ.  No need to get it from /stat.  If 
it's not set, it defaults to UTC.

if [ "$TIMEZONE" ]
then
echo "$TIMEZONE" > /tmp/etc/TZ
fi

if [ -f /stat/etc/TZ ]
then
cp /stat/etc/TZ /tmp/etc/TZ
fi

if [ -f /mnt/kd/TZ ]
then
cp /mnt/kd/TZ /tmp/etc/TZ
fi

As you can see with that code, it would read the variable set in 
rc.conf, then overwrite it with something out of /stat/etc/TZ if that 
file exists.

Darrick

-- 
Darrick Hartman
DJH Solutions, LLC
http://www.djhsolutions.com
_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to