The ntp-client init script has "use net" in place of "need net" in the dependancies. This leads to run ntp-client before any network service is operational and has internet connectivity. I changed "use net" to "need net" in depends(), and now it is started after the network interfaces are up. Reproducible: Always
No it does not. :) 11 Nov 2012; Mike Frysinger <vapier@gentoo.org> files/ntp-client.rc: Change "need net" to "after net" #439564#5 by Diego Elio Pettenò. It is "after net" now.
yes, but I don't understand why ntp-client is run before any network interface is up (at least in the case of parallel startup)
(In reply to Xavier Miller from comment #2) maybe you have net.lo provide net services in your rc.conf ?
I didn't change the default behaviour or net.lo. But I will take a look how to change that. Thank you for the reply! Xavier.
I've found the problem, because there is a problem ! ntp-client, as netmount, cannot be started before dns is run. So, ntp-clien should not depend() on "net", but on "dns".
(In reply to Xavier Miller from comment #5) that depends. not everyone uses hostnames, so hard depending on dns would be wrong. we could have the default conf.d include a line to use dns (since the default NTPCLIENT_OPTS uses Gentoo hostnames), but it's not going into the init.d script itself.
Commit message: Default to using dns since we default to using hostnames http://sources.gentoo.org/net-misc/ntp/files/ntp-client.confd?r1=1.13&r2=1.14 http://sources.gentoo.org/net-misc/ntp/files/ntp-client.rc?r1=1.12&r2=1.13