How to change boot process order for ntpd and ntpdate

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • ntp

Issue

  • Need to change boot order for ntpd and ntpdate services

Resolution

NOTE: ntpd doesn't set the clock immediately when it's started. It needs to make some measurements first in order to know how much the local clock is off and that normally takes about 10 seconds
with the iburst option or 3-4 minutes without it. It doesn't matter much when exactly ntpd is started in the boot sequence.

We don't recommend to change the boot order.

If for some reason, you need to do that, here is the procedure:

  • Edit the file "/etc/init.d/ntpd".

In the below line change the 58 to 15:

#chkconfig: - 15 74   <--- the first number is the position to start and the second is when to kill(S15ntpd, K74ntpd)
  • Edit the file "/etc/init.d/ntpdate".

Change the number as the above example.

#chkconfig: - 14 75
  • Disable the services at boot time to removed old links:
# chkconfig ntpd off
# chkconfig ntpdate off
  • Enable the services:
# chkconfig ntpd on
# chkconfig ntpdate on

Verify:

[root@server1 init.d]# ll ../rc5.d/S1*ntp*
lrwxrwxrwx. 1 root root 17 Dec 27 11:25 ../rc5.d/S14ntpdate -> ../init.d/ntpdate
lrwxrwxrwx. 1 root root 14 Dec 27 11:25 ../rc5.d/S15ntpd -> ../init.d/ntpd
  • Component
  • ntp

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.