Bug 426749 - An "-x" option in "/etc/sysconfig/ntpd" would be used contrariwise to what is indicated in the ntpd manpage
An "-x" option in "/etc/sysconfig/ntpd" would be used contrariwise to what is...
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ntp (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Miroslav Lichvar
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2007-12-25 14:38 EST by David Tonhofer
Modified: 2010-03-19 05:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-19 05:58:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Modified /etc/sysconfig/ntpd (457 bytes, text/plain)
2007-12-25 15:07 EST, David Tonhofer
no flags Details
Modified /etc/rc.d/init.d/ntpd script (5.30 KB, text/plain)
2007-12-25 15:08 EST, David Tonhofer
no flags Details
Unified diff between RH ntpd script and mine (4.70 KB, patch)
2007-12-25 15:10 EST, David Tonhofer
no flags Details | Diff

  None (edit)
Description David Tonhofer 2007-12-25 14:38:50 EST
Description of problem:

The script "/etc/rc.d/init.d/ntpd" interpretes an "-x" found in the OPTIONS
parameter in "/etc/sysconfig/ntpd" as:

- Starting "ntpdate" before "npd" and thus stepping the clock if necessary (as
  opposed to just skewing the clock slowly to the correct value over a longer 
  period of time). 

Apart from the fact that the use of "ntpdate" is deprecated (as indicated in
the ntpdate man page), one would expect the "-x" option to be used as indicated
in the "ntpd" manpage -- as one would expect OPTIONS to be simpyl passed to 

The "-x" option however means "do NOT step the clock - instead, skew it", 
which is exactly the contrary to what happens.

Thus I suggest the following:

Instead of using the "-x" option, add another argument to /etc/sysconfig/ntpd
to make things clear and use the "-x" as intended - as argument to "ntpd".


I shall add a patch for /etc/rc.d/init.d/ntpd and /etc/sysconfig/ntpd 
which use USE_NTPDATE. Also, the rc.d file has some additional comments.
Comment 1 David Tonhofer 2007-12-25 15:07:49 EST
Created attachment 290380 [details]
Modified /etc/sysconfig/ntpd

Additional USE_NTPDATE and comments
Comment 2 David Tonhofer 2007-12-25 15:08:59 EST
Created attachment 290381 [details]
Modified /etc/rc.d/init.d/ntpd script
Comment 3 David Tonhofer 2007-12-25 15:10:17 EST
Created attachment 290382 [details]
Unified diff between RH ntpd script and mine
Comment 4 David Tonhofer 2007-12-25 19:37:16 EST
Comment on attachment 290380 [details]
Modified /etc/sysconfig/ntpd

# OPTIONS are passed to ntpd as is.
# Drop root to id 'ntp' by default. ntpd uses the primary
# group of the indicated user. 
# The "-x" indicates that ntpd will always skew the clock.
# Replace "-x" by "-g -q" to implement the step-and-exit ntpdate behaviour.

OPTIONS="-u ntp -x -p /var/run/ntpd.pid"

# Use the (deprecated) ntpdate to step the clock to a correct 
# value before running "ntpd"

# Set to 'yes' to sync hw clock after a successful "ntpdate"
# execution (only used if USE_NTPDATE=yes)
Comment 5 Miroslav Lichvar 2008-01-02 09:42:14 EST
Users generally want to run ntpdate or have -g in ntpd options when -x is used
as it takes 2000 seconds to correct one second and the offset can be very large
before ntpd is running.

While I agree it's not very nice to modify the options before they are passed to
ntpd, it's too late in RHEL4 life to make incompatible changes like you have
proposed in the patch.

A possibility is to add another setting to sysconfig/ntpd so -x will be ignored
in the script. Would that be ok?
Comment 6 Miroslav Lichvar 2010-03-19 05:58:57 EDT
As RHEL-4.9 is the last update for RHEL-4, which should address only security, performance and critical issues, I'm closing this bug as WONTFIX. If you 
are still experiencing this issue with RHEL-5, please reopen it against RHEL-5.

If this issue is critical for you, please contact Red Hat support.

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