Red Hat Bugzilla – Bug 426749
An "-x" option in "/etc/sysconfig/ntpd" would be used contrariwise to what is indicated in the ntpd manpage
Last modified: 2010-03-19 05:58:57 EDT
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.
Created attachment 290380 [details]
Additional USE_NTPDATE and comments
Created attachment 290381 [details]
Modified /etc/rc.d/init.d/ntpd script
Created attachment 290382 [details]
Unified diff between RH ntpd script and mine
Comment on attachment 290380 [details]
# 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)
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?
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.