Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] /etc/localtime

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Casey Harkins <charkins AT upl.cs.wisc.edu>
  • To: sm-discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] /etc/localtime
  • Date: Wed, 5 Nov 2003 23:22:07 -0600 (CST)


On a somewhat related note, the hwclock.sh init script was recently
updated (added NEEDS="+local_fs") to fix issues when the hardware clock
was stored in localtime. We thought this had something to do with the
rtc.o module not being able to load without local_fs, but I the real
problem was likely that /usr wasn't mounted and the /etc/localtime symlink
couldn't be resolved. When the symlink can't be resolved, hwclock assumes
--utc even if the --locatime parameter is specified. The NEEDS="+local_fs"
fixes the problem for normal boot ups, but it will still break if /usr
isn't mounted for some reason (i.e. single user mode).

The solution is to copy the zoneinfo file to /etc/localtime instead of
symlinking. I'll test this on a machine with a localtime hardware clock
and see if this fixes the problem without the NEEDS="+local_fs". I suggest
we:

1) make sure the 0.8 iso's installer copies instead of symlinks
2) update the hwclock.sh init script to check if /etc/localtime is a
symlink and copy the file into place if it is
3) update the UPDATED field on util-linux (which installs the hwclock.sh
script)
4) wait a month or two and remove the NEEDS="+local_fs" from hwclock.sh

Does this sound like an appropriate fix? Where should I bug this,
codex->utils or basesystem->initscripts?

Maybe if /etc/localtime is a regular file and not a symlink, your
mysterious demons will stopping linking it to /usr/share/zoneinfo/Factory.
Not really a solution, but you could give it a try.

-casey


References:
http://bugs.linuxfromscratch.org/show_bug.cgi?id=259
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=19140
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91228


On Wed, 5 Nov 2003, Eric Sandall wrote:

> It seems about once every other day (that's when I get to check) my
> /etc/localtime is overwritten to point to /usr/share/zoneinfo/Factory,
> anyone
> know what could be causing this? (This happens without reboots, so it's not
> the
> init scripts, but perhaps something running?).
>
> /usr/share/zoneinfo is from glibc, but /etc/localtime has no package
> associated
> with it.
>
> This is getting annoying that something is overwritting a system file
> without
> ever asking me.
>
> -sandalle





Archive powered by MHonArc 2.6.24.

Top of Page