getting ntp to run upon boot
I just setup ntp4 on my ubuntu 7.04 machine and have it running properly only I can't figure out what all I need to do to get it to consistently run on boot.
I don't want something to screw up the run levels by my stupidity in improperly setting this up. You might want to step by step me through this. I've never messed with run levels and all this fun stuff. Thanks, Mike 00noob |
Are the init scripts set to start in /etc/rc2.d ?
Quote:
aptitude update aptitude install sysv-rc-conf sysv-rc-conf Check the boxes for the appropriate services run-levels |
ntp not listed in sysv-rc.conf
i installed the configurator and ran it but ntp isn't listed with the other programs. is there something i have to do to get it to detect it?
I have ntp installed and running, so i know it's on the machine. |
How did you install ntp ? did you use Synaptic ? or Aptitude ? or did you install it from Source ( a tarball ) you downloaded from somewhere ?
aptitude install ntp should install ntp from the Ubuntu repository, add the script and startup link in rc2.d |
source install
i installed ntp from source. compiled last night.
I have the service running and everything seems to be ok. it's still syncing up with the servers in my conf file. I just need to know how to make a script so it will run ntp upon ubuntu loading. not thru the gui or any other ways. i need to know where to drop the script..should i put it in /etc/init.d or the rc2.d-rc5.d directories. i just need to know what the difference is between init.d and rc2.d-rc5.d or if they're both interconnected. i can't find any documentation. maybe i'm just looking in the wrong place |
Rather than check the ntp servers at boot (maybe I have to reboot several times a day, if I am playing with linux), I solved this problem like this:
http://www.linuxquestions.org/questi...34#post2727634 If you really want to sync to the timeserver only at boot, then just put the line /usr/sbin/chktime (You'll have to read the above post to get the chktime script) at the end of your rc.local file (usually found at /etc/rc.local ), and the time will be set at boot, but only once a day. Oh, and don't forget to make that chktime script executable ( chmod +x /usr/sbin/chktime ), or it won't work! Hope this helps. |
How-to Write Sysv Style Init scripts - http://www.debian.org/doc/debian-pol...ys.html#s9.3.2
|
All times are GMT -5. The time now is 07:29 PM. |