[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

rock around hwclock.sh


I'd like to hear opinions on hwclock.sh operation.

Few thoughts of my own:

i) It's still quite common that battery in the RTC becomes flat.
In this case, hwclock.sh silently sets system clock to 1970 (or
whatever else nonsense), efficiently turning file access and modify
times into a mess, and also causing at least two fscks of the root fs.
It'd be good if `hwclock.sh stop` stored the current system time in a
file, and on boot, if the current time (as per RTC) is earlier,
set the system clock to $storedtime + small-enough-constant, so at
least the time runs forward. I've implemented this on my local machine
(I had problems with my RTC for a while) and it worked. And yet more:
NTP isn't always available, especially whe you're mobile.

ii) Possibly, `hwclock.sh stop` should be run more frequently than just
once on shutdown, because it sometimes happens that the system doesn't
shut down correctly. If that happens after some time correction (like
DST), system time can go wrong, and ntp might not perform the automatic
correction. Possibly, hwclock saving can be done, for example, once a
day per anacron, or... any more ideas?

iii) Also, it would be good to hear opinions about negative
consequences of saving the system time to the RTC on frequent basis.

Thanks for your responses.

WBR, Andrew

Attachment: signature.asc
Description: PGP signature

Reply to: