On Nov 9, 2007 10:33 AM, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> On Nov 9, 2007 9:31 AM, Alexander E. Patrakov <[EMAIL PROTECTED]> wrote:
>
> > 2) With the hardware clock in UTC, the bootscript executes "hwclock
> > --hctosys --utc", however, "strace -e open hwclock --hctosys --utc"
> > indicates that the /usr/share/zoneinfo/Universal file is also being
> > opened. However, the setclock script runs before mounting /usr. Is this
> > a problem? (with --localtime, it doesn't open any files from /usr).
>
> Good catch. I don't know what to do here. What happens is that if
> --utc is given, hwclock sets TZ="" and then does tzset(), which grabs
> the Universal tzfile if TZ is set but empty. You can see this easily:
OK, ugly hack after reading tzset(3).
cp /usr/share/zoneinfo/Universal /etc
if [ ! -f /usr/share/zoneinfo/Universal ]; then
TZDIR=/etc hwclock --hctosys --utc
else
hwclock --hctosys --utc
fi
TZDIR overrides the default of /usr/share/zoneinfo. I can't recommend
this as a solution, but it's a possibility.
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page