Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 05-29-2006, 03:23 PM   #1
LQ Newbie
Registered: May 2004
Location: berkeley
Distribution: rhel, fedora
Posts: 2

Rep: Reputation: 0
getting ntp to auto start on reboot


On RedHat 7.3, running as a server (no graphical interface), I configured ntp.

I managed to winkle out all I needed to know to get it to work the way I wanted - syncing with official timeservers, providing time service to the rest of my network.

Now I want to get ntp to start when the machine reboots.

I thought I had it figured out, and did the following :
~ changed "-" to "2345" in /etc/rc.d/init.d/ntpd (inittab says id:3:initdefault: )
~ did /sbin/chkconfig --add ntpd
(response to that last command was right back to prompt. there was no error messages. there was also no success message...)

Then I rebooted. Did ps -ax | grep ntp. That returned nothing.

When I do /sbin/chkconfig --list ntpd, I get "off" for all levels.

Just now, reading a previous post about getting mysql to auto-start, I looked at the entries in rc2-5.d. In all those directories, the link to /etc/rc.d/init.d/ntpd is named K74ntpd.

I think I know that the linkname must start with S for the service to be started. I thought that chkconfig, as manager of the links, would cause that to be the case.

So, 2 questions :
~ Why did "/sbin/chkconfig --add ntpd" not work?
~ Is it safe to manually rename the current link to S74ntpd? (This server is a vital link in our DNS system. I don't want to thrash about thoughtlessly...)

Old 05-29-2006, 03:29 PM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I don't know abot rh7.3, but in fc5, you would use

chkconfig ntpd on

to have ntpd start automatically

(typing chkconfig --list after this should show it set to on)

--add would seem to add the service to chkconfig's "list" of services (ie so it shows up in chkconfig --list), not activate it per se

K74ntpd defines what happens on shutdown (K = kill), whereas there should be a corresponding S entry (S = startup). These should be OK by default I'd have thought

Last edited by billymayday; 05-29-2006 at 03:35 PM.
Old 05-29-2006, 04:34 PM   #3
LQ Newbie
Registered: May 2004
Location: berkeley
Distribution: rhel, fedora
Posts: 2

Original Poster
Rep: Reputation: 0
thanks... that got me over the hump.

I'd taken note of the on|off|reset syntax in the man page, but got side-tracked with the --add switch...

I see now, the "2345" setting in the ntpd init file in init.d gets read when you do chkconfig <service> reset. Reading that setting writes the files in the rc2-5.d directories.

I didn't actually try "on" - still had the idea that was temporary, lost when the sytem re-started... I guess what actually happens is it writes the S and/or K file in the specified (or current level, if not specified?) runlevel directory...

anyway, thanks!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto start my sql server upon reboot? john_d13 Slackware 6 01-17-2006 02:11 PM
samba auto start on reboot vMatthews Debian 4 11-08-2005 06:40 PM
How do I auto start modules that aren't auto loaded on boot? darkbluedrew Debian 2 09-18-2005 09:10 AM
eth0 Auto Connect, How to auto start on logon cornish Linux - Networking 2 05-09-2005 12:02 PM
ntp.conf rewriting on reboot to install-default dfowensby Slackware 2 02-16-2005 11:01 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration