Bug 1611 - running \'hwclock --systohc\' at shutdown may be wrong
: running \'hwclock --systohc\' at shutdown may be wrong
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/initscripts)
: unstable
: all Linux
: P5 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-11-24 17:34 by
Modified: 2003-08-25 15:18 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-11-24 17:34:48
\"/etc/rc.r/init.d/clock stop\" runs \"hwclock --systohc\"
- this happens at each system shutdown or reboot. However, this command updates
/etc/adjtime with assumption that the user has set the correct time - which is
most likely not the case. Because of this, properly adjusting the speed of the
RTC hardware clock is impossible - any such adjustment will be broken by this
RTC setting at reboot (because the system clock might not have the correct
speed too).

This problem is significant if a time synchronization service (ntp) is not used
(which is a very common situation).

I propose to add several configuration parameters to /etc/sysconfig/clock to
disable running \"hwclock --systohc\" at shutdown and to enable
\"hwclock --adjust\" at startup (which is recommended by the hwclock
man page):

HWCLOCK_SET_AT_HALT=false disables setting the RTC time from the system time at
shutdown or reboot.

HWCLOCK_ADJUST=true enables running \"hwclock --adjust\" before
\"hwclock --hctosys\" at startup.

The default values may be HWCLOCK_SET_AT_HALT=true, HWCLOCK_ADJUST=false to
keep the old behavior by default (to avoid breaking the existing
configurations). However, on new installs it may be better to set the opposite
parameters (if the GUI/console configuration frontends to set the time use
hwclock correctly).
---

---
------- Comment #1 From 2002-12-08 16:36:07 -------
Implemented in initscripts-5.49-ipl46mdk, please check.
------- Comment #2 From 2002-12-08 16:36:07 -------
Implemented in initscripts-5.49-ipl46mdk, please check.
------- Comment #3 From 2002-12-23 15:45:30 -------
Should be fixed, reopen if not.
------- Comment #4 From 2002-12-23 15:45:30 -------
Should be fixed, reopen if not.