Bug 132918

Summary: /etc/rc.d/ntp should write clock to CMOS after doing ntpdate
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Vojtech Pavlik <vojtech>
Component: BasesystemAssignee: Hendrik Vogelsang <hvogel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vojtech Pavlik 2005-11-09 14:40:01 UTC
When ntpd is running, the kernel automatically updates CMOS every 13 minutes
to match the system time. However, the updates can only work when time is off
by less than +-15 minutes.

As a result, if the CMOS time is completely wrong, ntpdate changes the system
time to the correct value, the discrepancy between CMOS and system time
is much larger. The kernel will try to update the CMOS time each 13 minutes,
and will FAIL, saying so in the kernel log.

A correct fix is to use 'hwclock' to update the CMOS time after ntpdate was
run, to fix any differences larger than 15 minutes.
Comment 1 Hendrik Vogelsang 2005-11-14 10:22:59 UTC
Hm i really dont know if i want to do this. The ntp init script is already a pile of functions working around stuff that a system adiministrator should take care of manually. If your CMOS clock is that much off you should correct it, not ntp. 
Comment 2 Vojtech Pavlik 2005-11-14 11:52:06 UTC
I see your point. However, in that case one could argue that 'adjtime' should
be used instead of ntpdate in that script, too. There are machines that don't
keep the time all that well when turned off, and where NTP is the only sane
option. On those the kernel CMOS updates will fail, and the administrator would
have to fix the CMOS time all too much often.
Comment 3 Hendrik Vogelsang 2005-11-14 12:10:44 UTC
ok i will implement it with a sysconfig variable default set to no. Like NTP_ADJUST_CMOS_CLOCK='no'. Is that ok for you?
Comment 4 Vojtech Pavlik 2005-11-14 12:26:49 UTC
Yes, I think that'd be fine.
Comment 5 Hendrik Vogelsang 2005-11-28 11:32:49 UTC
done in factory