#2266: Set system time before bootscripts run
-------------------------------------+--------------------------------------
Reporter: d...@… | Owner: lfs-b...@…
Type: task | Status: new
Priority: normal | Milestone: 7.0
Component: Book | Version: SVN
Severity: normal | Keywords:
-------------------------------------+--------------------------------------
Comment(by br...@…):
Replying to [comment:5 bdu...@…]:
> I propose to solve this ticket in the way that ubuntu does:
Which would allow setting the time earlier, at least. Not quite before
any of the bootscripts run, but maybe early enough.
(With initramfs, OTOH... ah, never mind. :-) )
> KERNEL=="rtc", ACTION=="add", RUN+="set_hwclock"
Duplicate this for SUBSYSTEM=="rtc" (or just s/KERNEL/SUBSYSTEM/ and leave
one rule -- I don't know if that will work with CONFIG_GEN_RTC), and this
looks good.
> 3. Add set_hwclock. ubuntu has it in /lib/udev/, but perhaps we should
put it in /sbin.
I'd prefer /lib/udev, but only because I don't think anything else is
going to call this...
> ubuntu's set_hwclock looks like:
I'd prefer to keep this similar to our current setclock script: include
/etc/sysconfig/clock (not rcS), use the UTC set there instead of this
crazy GMT thing, use CLOCKPARAMS throughout, but probably get rid of the
initscript-specific includes (/etc/sysconfig/rc and the variable
containing the main bootscript functions file).
> We probably want to just ignore badyear (man hwclock) as we do now. I
wouldn't think too many users have hw with a bios from 95 or 96.
Agreed.
I assume the Ubuntu hwclock bootscript still allows setting the clock at
shutdown?
Hmm -- would it be simpler to add RUN+="/etc/rc.d/init.d/setclock start"
to the udev rule, and just kill the start symlinks? That way we only have
one file to maintain...
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2266#comment:6>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page