[Pkg-sysvinit-devel] What's up with hwclock?

Henrique de Moraes Holschuh hmh at debian.org
Mon Jan 23 02:44:17 UTC 2006


On Sun, 22 Jan 2006, Thomas Hood wrote:
> HMH: Do you know the status of the proposed changes to the hwclock initscripts?

Basically?  Someone decided to play the smartass, and I got so pissed off I
frankly am uninclined to even look twice at util-linux for a few weeks.

Here's what I think needs to be done, in case you guys would be so kind to
take a go at it:

[Full proposed fix, will work only when all steps are deployed]

Step 1: Get util-linux to run the first hwclock script at the absolutely
   earliest possible moment (which is as soon as /dev is available. I think
   S05 is about right).   The second script doesn't matter to us, but it
   should be run after /etc is writeable because it will be only useful for
   doing /etc/adjtime things.

Step 2: Get glibc to manage /etc/localtime as a copy (or hardlink, when
   possible) of the timezone file, and not a symbolic link to it.   Thus,
   timezone information will be available during the entire part of the boot
   sequence we deal with (i.e. after / is mounted).  initrd people
   might want to copy that file too.

   What I've done about this so far:

   1. Verified that /etc/localtime as a copy of the timezone file is indeed
      what Fedora Core4 does (which I am told by glibc's team is an
      important datapoint for them, because of glibc's upstream).

   2. Verified that only a few scripts in the glibc package would need to
      be fixed for it to work just fine, and that nothing in glibc will
      break because of the change.

   3. Verified that only applications that are already doing unacceptable
      manipulation of /etc/localtime would break (in Debian, you have to
      keep /etc/timezone correct, too. That means use tzconfig to change
      these things).  *I didn't even attempt to test this yet, but I found
      a bug report about some kde clock crap in the Fedora database*

I am running two machines where /etc/localtime is a file, and they operate
just fine.

However, the most important point was NOT done: I did NOT test the two fixes
above yet to actually resolve the issue (wrong timezone during early boot).
Feel free to do so, I will do that first thing when I decided to restart
working on this issue.

> There have been some util-linux uploads recently, but the initscripts are
> still installed to run at a time when only the root filesystem is writable.
> 
>     update-rc.d hwclockfirst.sh start 18 S . > /dev/null
>     update-rc.d hwclock.sh start 22 S . stop 25 0 6 . > /dev/null

IMHO it should be S05 (just after /dev is stable, for /dev/rtc) for the
first one, and there is no point running the other before / is mounted
read-write, unless util-linux wants to do some /dev/shm mess (as we don't
have /run ;-) ).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-sysvinit-devel mailing list