public inbox for gentoo-user-de@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user-de] ntp-client startet zu früh
@ 2013-08-29 20:27 Hartmut Figge
  2013-08-30  4:42 ` Johann Schmitz
  0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Figge @ 2013-08-29 20:27 UTC (permalink / raw
  To: gentoo-user-de

Gruß,

----- rc.log -----
[...]
 * Bringing up interface ppp0
 *   Starting pppd in ppp0 ...
 [ ok ]
 *   Backgrounding ...
 * WARNING: net.ppp0 has started, but is inactive
[...]
 * WARNING: netmount is scheduled to start when net.ppp0 has started
 * Setting clock via the NTP client 'ntpdate' ...
Error resolving 0.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 1.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 2.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 3.gentoo.pool.ntp.org: Name or service not known (-2)
 * Failed to set clock
 [ !! ]
 * ERROR: ntp-client failed to start
 * Starting ntpd ...
 [ ok ]
[...]
---------------

Es wird zur Console gebootet und X später per startx händisch gestartet.
Nach dem Login zeigt route häufig, dass ppp0 noch nicht da ist. Wie
bekomme ich ntp-client dazu, lange genug zu warten?

----- rc.conf -----
[...]
rc_depend_strict="YES"
[...]
---------------

Hartmut



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user-de] ntp-client startet zu früh
  2013-08-29 20:27 [gentoo-user-de] ntp-client startet zu früh Hartmut Figge
@ 2013-08-30  4:42 ` Johann Schmitz
  2013-08-30  7:47   ` Hartmut Figge
  2013-08-30  9:12   ` Marc Joliet
  0 siblings, 2 replies; 4+ messages in thread
From: Johann Schmitz @ 2013-08-30  4:42 UTC (permalink / raw
  To: gentoo-user-de

Hallo Hartmut,

die Dependencies sind im Init-Script definiert. Für den ntp-client heißt
dies z.B.:

depend() {
    before cron portmap
    after net
    use dns logger
}

Die Dependency "net" (und vermutlich damit auch "dns") wird allerdings
durch dein eth0 erfüllt, weshalb der ntp-client vor deinem ppp0
gestartet werden kann. Eine weiter Dependency direct im Init-Script
hinzuzufügen ist nicht zu empfehlen, da sie bei einem Update direkt
wieder überschrieben wird.

Du kannst aber in der /etc/rc.conf weitere Abhängigkeiten definieren:

# Below is an example for service foo-bar. Note that the '-' is illegal
# in a shell variable name, so we convert it to an underscore.
# example for service foo-bar.
#rc_foo_bar_config="/etc/foo-bar"
#rc_foo_bar_need="openvpn"
#rc_foo_bar_after="clock"

Für ntp-client müsste das also

rc_ntp_client_need="net.ppp0"
bzw.
rc_ntp_client_after="net.ppp0"

heißen. Der Unterschied zwischen need und after steht in der Manpage.


Gruß,
Johann


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user-de] ntp-client startet zu früh
  2013-08-30  4:42 ` Johann Schmitz
@ 2013-08-30  7:47   ` Hartmut Figge
  2013-08-30  9:12   ` Marc Joliet
  1 sibling, 0 replies; 4+ messages in thread
From: Hartmut Figge @ 2013-08-30  7:47 UTC (permalink / raw
  To: gentoo-user-de

Johann Schmitz:

[rc.conf]
>Für ntp-client müsste das also
>
>rc_ntp_client_need="net.ppp0"
>bzw.
>rc_ntp_client_after="net.ppp0"
>
>heißen. Der Unterschied zwischen need und after steht in der Manpage.

Danke. :)

----- rc.log -----
[...]
 * WARNING: ntp-client is scheduled to start when net.ppp0 has started
[...]
---------------

Hartmut



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user-de] ntp-client startet zu früh
  2013-08-30  4:42 ` Johann Schmitz
  2013-08-30  7:47   ` Hartmut Figge
@ 2013-08-30  9:12   ` Marc Joliet
  1 sibling, 0 replies; 4+ messages in thread
From: Marc Joliet @ 2013-08-30  9:12 UTC (permalink / raw
  To: gentoo-user-de

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

Am Fri, 30 Aug 2013 06:42:57 +0200
schrieb Johann Schmitz <ercpe@gentoo.org>:

[...] 
> Du kannst aber in der /etc/rc.conf weitere Abhängigkeiten definieren:
[...]

Nur mal nebenbei: diese Angaben können auch direkt in /etc/conf.d/net
geschrieben werden, falls du sie lieber direkt mit den anderen Netzwerksachen
zusammen haben willst. Ich habe selber eine Reihe von rc_* Zeilen da drin :) .

Gruß
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-30  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 20:27 [gentoo-user-de] ntp-client startet zu früh Hartmut Figge
2013-08-30  4:42 ` Johann Schmitz
2013-08-30  7:47   ` Hartmut Figge
2013-08-30  9:12   ` Marc Joliet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox