Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473222 - net-misc/ntp: ntp-client init script should depend on net and not use net
Summary: net-misc/ntp: ntp-client init script should depend on net and not use net
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-13 20:08 UTC by Xavier Miller (RETIRED)
Modified: 2013-12-24 11:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Miller (RETIRED) gentoo-dev 2013-06-13 20:08:27 UTC
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
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-14 14:46:07 UTC
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.
Comment 2 Xavier Miller (RETIRED) gentoo-dev 2013-06-14 15:25:28 UTC
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)
Comment 3 SpanKY gentoo-dev 2013-06-17 01:46:01 UTC
(In reply to Xavier Miller from comment #2)

maybe you have net.lo provide net services in your rc.conf ?
Comment 4 Xavier Miller (RETIRED) gentoo-dev 2013-06-17 05:54:18 UTC
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.
Comment 5 Xavier Miller (RETIRED) gentoo-dev 2013-06-18 17:06:17 UTC
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".
Comment 6 SpanKY gentoo-dev 2013-06-24 15:45:34 UTC
(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.
Comment 7 SpanKY gentoo-dev 2013-12-24 11:01:53 UTC
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