At least as of redhat 6.1, hwclock --systohc is never called
automatically. This strikes me as a bug, as the system will often have
correct time via ntp while running, but the hardware only gets
resychronized by hand. Come next reboot, lather, rinse, repeat.
Still there in RHL7 too.
I've gotten around with this by creating a /etc/cron.daily/set-clock script which
writes down the time every day. Works when your system crashes too ;-)
Seems more of an initscripts than util-linux problem.
Will be fixed in initscripts-5.53-1; thanks for the report!
However, the fix currently in RawHide (initscripts-5.54-1) seems to be wrong: it
doesn't take account of the setting of UTC and ARC in /etc/sysconfig/clock.
Presumably it ought either to call /usr/sbin/setclock instead, or have some
extra code (analogous to that in /etc/rc.d/rc.sysinit) to take account of those
Yep, that got fixed a couple of builds later. :)
Great. Very minor, picky nit, but presumably $CLOCKDEF was meant to be used in
the descriptive string when doing the "runcmd ... /sbin/hwclock"?
While we're on the subject (even more minor, pickier nit!), there's an extra
space which probably wasn't intended in the corresponding place in
Patch attached to fix both.
Created attachment 13704 [details]
Minor cosmetic fixes when setting system and hardware clocks