Summary: | hwclock --systohc on halt is bad idea | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stanislav Brabec <utx> |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mschulkind |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
modified clock initscript
Patch against standard clock initscript to avoid setting hw clock |
Description
Stanislav Brabec
2003-02-17 05:01:00 UTC
so why not just use ntp, it'll fix these kind of problems Dial-up machine - dialing only for ntp sync will be too expensive. Gentoo should be able to have acurrate time even as standalone box without net connection. fair enough It is pretty standard practice for most distro, and I guess a more expected behaviour. What you want is more complexity than needed for the standard user, and is very system specific. I am however open to a good generic solution if you want to take a stab at it. To be honest, current works good for most user, and I just do not have the time to get to this in a while. OK. Trivial solution: Remove everything in /etc/init.d/clock in stop() section and keep there only stub (eend 0 ; return 0). It solves problems with hwclock acurracy. I have looked at SuSE's /etc/init.d/boot.clock and it also doesn't anything with clock on halt. Wouldn't it be better to move all clock configuration to /etc/conf.d/clock, removing the lines from /etc/rc.conf and include an option to sync_on_shutdown? Created attachment 28189 [details]
modified clock initscript
Here is a modified "clock" initscript. I also do not want hwclock to set the
hardware clock on shutdown. In my case, it's because I want chrony (an NTP
daemon) to handle things. My script simply checks for a value in ${SYNC_HW} in
/etc/conf.d/clock. If the variable doesn't have a value, it skips setting the
hardware clock.
Created attachment 28190 [details, diff]
Patch against standard clock initscript to avoid setting hw clock
Come to think of it, a patch would be better.
This seems fairly safe and useful. Could this be applied? fixed in cvs, will be in baselayout 1.11.3+ |