Bug 21187

Summary: hwclock is never called on shutdown
Product: [Retired] Red Hat Linux Reporter: Need Real Name <hag>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Dale Lovelace <dale>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: chris, dr, pekkas, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-22 16:53:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Minor cosmetic fixes when setting system and hardware clocks none

Description Need Real Name 2000-11-21 16:33:10 UTC
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.

Comment 1 Pekka Savola 2000-11-21 17:27:26 UTC
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.


Comment 2 Bill Nottingham 2000-12-12 08:20:04 UTC
Will be fixed in initscripts-5.53-1; thanks for the report!

Comment 3 chris 2001-01-25 13:15:21 UTC
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
settings?

Comment 4 Bill Nottingham 2001-01-25 18:06:45 UTC
Yep, that got fixed a couple of builds later. :)

Comment 5 chris 2001-03-26 17:39:02 UTC
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
/etc/rc.d/rc.sysinit.

Patch attached to fix both.

Comment 6 chris 2001-03-26 17:40:03 UTC
Created attachment 13704 [details]
Minor cosmetic fixes when setting system and hardware clocks