diff options
author | Maciej S. Szmigiero <mail@maciej.szmigiero.name> | 2017-11-29 20:49:27 +0100 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2018-07-11 23:51:03 -0700 |
commit | 6f261f1beec1ecbfe7ec39ae33b5a7f947292f6e (patch) | |
tree | b375ef3ba0aa1affbc71adf351d768220a045a14 /doc | |
parent | doc: usage example for wireguard (diff) | |
download | netifrc-6f261f1beec1ecbfe7ec39ae33b5a7f947292f6e.tar.gz netifrc-6f261f1beec1ecbfe7ec39ae33b5a7f947292f6e.tar.bz2 netifrc-6f261f1beec1ecbfe7ec39ae33b5a7f947292f6e.zip |
init.d/net.lo: add a configurable presence timeout
Sometimes one may want to wait for a particular interface to show up
when starting its service.
For example if a "net.foo" service is in the "default" runlevel so it
provides (or co-provides) the "net" service and it takes a while for the
"foo" interface to initialize and show up in the system during boot this
interface initialization will race with starting of this "net.foo" service
by the service manager - if the interface hasn't shown up yet the service
won't be able to start (and so will services that depend on it).
This setting specifies how long we'll wait for an interface to show up
in this case (in seconds).
For backward-compatibility the default is 0 (don't wait at all) - this
matches the existing behavior of netifrc, so existing deployments aren't
affected by this change.
This new setting is similar to an already present "wait for carrier
timeout" setting.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
(cherry picked from commit 64f33a2032b4972a25cad6405678f678a5a269ff)
Closes: https://github.com/gentoo/netifrc/pull/28
Diffstat (limited to 'doc')
-rw-r--r-- | doc/net.example.BSD.in | 16 | ||||
-rw-r--r-- | doc/net.example.Linux.in | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/doc/net.example.BSD.in b/doc/net.example.BSD.in index 1df32e0..4c574b4 100644 --- a/doc/net.example.BSD.in +++ b/doc/net.example.BSD.in @@ -77,6 +77,22 @@ # Some users may need to alter the MTU - here's how #mtu_eth0="1500" +# Sometimes you may want to wait for a particular interface to show up +# when starting its service. +# For example if a net.foo service is in the "default" runlevel so it +# provides (or co-provides) the "net" service and it takes a while for the +# "foo" interface to initialize and show up in the system during a boot this +# will race with starting of net.foo service by the service manager - if the +# interface hasn't shown up yet the service won't be able start (and so +# will services that depend on it). +# This setting specifies how long we wait for an interface to show up +# in this case (in seconds). +# The current default is 0 - we need an interface to be already present +# in the system when its service is started. +#presence_timeout=0 +# This setting can be also adjusted on a per-interface basis: +#presence_timeout_eth0=10 + # Most drivers that report carrier status function correctly, but some do not # One of these faulty drivers is for the Intel e1000 network card, but only # at boot time. To get around this you may alter the carrier_timeout value for diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in index c0cfd38..3b414ba 100644 --- a/doc/net.example.Linux.in +++ b/doc/net.example.Linux.in @@ -126,6 +126,22 @@ # tables you may have to set a global metric as the due to a simple read of # the routing table taking over a minute at a time. +# Sometimes you may want to wait for a particular interface to show up +# when starting its service. +# For example if a net.foo service is in the "default" runlevel so it +# provides (or co-provides) the "net" service and it takes a while for the +# "foo" interface to initialize and show up in the system during a boot this +# will race with starting of net.foo service by the service manager - if the +# interface hasn't shown up yet the service won't be able start (and so +# will services that depend on it). +# This setting specifies how long we wait for an interface to show up +# in this case (in seconds). +# The current default is 0 - we need an interface to be already present +# in the system when its service is started. +#presence_timeout=0 +# This setting can be also adjusted on a per-interface basis: +#presence_timeout_eth0=10 + # Most drivers that report carrier status function correctly, but some do not # One of these faulty drivers is for the Intel e1000 network card, but only # at boot time. To get around this you may alter the carrier_timeout value for |