ntp

Mark LaPierre marklapier at aol.com
Fri Jan 25 02:12:24 UTC 2013


On 01/24/2013 06:46 PM, Jan Litwiński wrote:
> I have proglem with ntp service, I did:
>
> systemctl enable ntpd.service
> systemctl start ntpd.service
>
> but ntp don't start at boot, starting by hand works. As a solution I
> created rc.local and add to it systemctl start ntpd.service and it works. I
> think ntpd starts before NetworkManager, My question is what is correct
> solution ?
>
> TIA

Hey Jan,

I don't know if F18 has changed the way services start but if there is 
an /etc/rc.d directory full of:

drwxr-xr-x. 2 root root  4096 Jan 12 21:00 init.d
-rwxr-xr-x. 1 root root  2617 Sep 17 05:54 rc
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc0.d
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc1.d
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc2.d
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc3.d
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc4.d
drwxr-xr-x. 2 root root  4096 Jan 24 01:04 rc5.d
drwxr-xr-x. 2 root root  4096 Jan 12 21:01 rc6.d
-rwxr-xr-x. 1 root root   220 Sep 17 05:54 rc.local
-rwxr-xr-x. 1 root root 19370 Sep 17 05:54 rc.sysinit

you can set the order of service starts by setting sym-links in the 
appropriate run level directory.

/etc/rc.d/rc5.d
[mlapier at mushroom rc5.d]$ ll
lrwxrwxrwx. 1 root root 14 Jan  2  2012 S58ntpd -> ../init.d/ntpd
[mlapier at mushroom rc5.d]$

There are two link name formats.
Knn<Service>
Snn<Service>

K stands for kill, S stands for start.

The two digit number sets the order of action.

link ntpd with a number larger than all the network service setups. 
That should do it.

-- 
     _
    °v°
   /(_)\
    ^ ^  Mark LaPierre
Registerd Linux user No #267004
https://linuxcounter.net/
****


More information about the users mailing list