getting ntp to auto start on reboot
Hi,
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...) TIA... |
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 |
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! |
All times are GMT -5. The time now is 11:26 PM. |