summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/NETWORKING
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2016-01-24 19:41:31 +0000
committerian <ian@FreeBSD.org>2016-01-24 19:41:31 +0000
commit7931527943ac641f99c133186d770905e97da021 (patch)
tree84b1b4f9ee490e0de53a85b1dfe0c143761ed53c /etc/rc.d/NETWORKING
parentbbe1a22899c8196b0c7c656f13e9561670f447ee (diff)
downloadFreeBSD-src-7931527943ac641f99c133186d770905e97da021.zip
FreeBSD-src-7931527943ac641f99c133186d770905e97da021.tar.gz
MFC r292752:
Enhance rc.d/netwait script to wait for late-attaching interfaces such as USB NICs. USB network hardware may not be enumerated and available when the rc.d networking scripts run. Eventually the USB attachment completes and devd events cause the network initialization to happen, but by then other rc.d scripts have already failed, because services which depend on NETWORKING (such as mountcritremote) may end up running before the network is actually ready. There is an existing netwait script, but because it is dependent on NETWORKING it runs too late to prevent failure of some other rc scripts. This change flips the order so that NETWORKING depends on netwait, and netwait now depends on devd and routing (the former is needed to make interfaces appear, and the latter is needed to run the ping tests in netwait). The netwait script used to be oriented primarily towards "as soon as any host is reachable the network is fully functional", so you gave it a list of IPs to try and you could optionally name an interface and it would wait for carrier on that interface. That functionality still works the same, but now you can provide a list of interfaces to wait for and it waits until each one of them is available. The ping logic still completes as soon as the first IP on the list responds. These changes were submitted by Brenden Molloy <brendan+freebsd@bbqsrc.net> in PR 205186, and lightly modified by me to allow a list of interfaces instead of just one. PR: 205186 Relnotes: yes
Diffstat (limited to 'etc/rc.d/NETWORKING')
-rwxr-xr-xetc/rc.d/NETWORKING2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/rc.d/NETWORKING b/etc/rc.d/NETWORKING
index 71cf26d..ff63c0c 100755
--- a/etc/rc.d/NETWORKING
+++ b/etc/rc.d/NETWORKING
@@ -4,7 +4,7 @@
#
# PROVIDE: NETWORKING NETWORK
-# REQUIRE: netif netoptions routing ppp ipfw stf faith
+# REQUIRE: netif netwait netoptions routing ppp ipfw stf faith
# REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge
# REQUIRE: static_arp static_ndp
OpenPOWER on IntegriCloud