summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2006-06-01 00:41:07 +0000
committerthompsa <thompsa@FreeBSD.org>2006-06-01 00:41:07 +0000
commitf6293051c9bcfc333ae61c575230e2f23c6390d3 (patch)
treeeacc21ad5d48ab5f45bf67df8e6eb129d05ff383 /etc
parent7bd2588031d7ff3f099e21244f9f1750a0f2d495 (diff)
downloadFreeBSD-src-f6293051c9bcfc333ae61c575230e2f23c6390d3.zip
FreeBSD-src-f6293051c9bcfc333ae61c575230e2f23c6390d3.tar.gz
Announce all interfaces to devd on attach/detach. This adds a new devctl
notification so all interfaces including pseudo are reported. When netif creates the clones at startup devctl_disable has not been turned off yet so the interfaces will not be initialised twice, enforce this by adding an explicit order between rc.d/netif and rc.d/devd. This change allows actions to taken in userland when an interface is cloned and the pseudo interface will be automatically configured if a ifconfig_<int>="" line exists in rc.conf. Reviewed by: brooks No objections on: net
Diffstat (limited to 'etc')
-rw-r--r--etc/devd.conf18
-rw-r--r--etc/rc.d/devd4
2 files changed, 12 insertions, 10 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index a8d7716..15adefa 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -28,17 +28,19 @@ options {
# override these general rules.
#
-# For ethernet like devices start configuring the interface. Due to
-# a historical accident, this script is called pccard_ether.
+# Configure the interface on attach. Due to a historical accident, this
+# script is called pccard_ether.
#
-attach 0 {
- media-type "ethernet";
- action "/etc/pccard_ether $device-name start";
+notify 0 {
+ match "system" "IFNET";
+ match "type" "ATTACH";
+ action "/etc/pccard_ether $subsystem start";
};
-detach 0 {
- media-type "ethernet";
- action "/etc/pccard_ether $device-name stop";
+notify 0 {
+ match "system" "IFNET";
+ match "type" "DETACH";
+ action "/etc/pccard_ether $subsystem stop";
};
#
diff --git a/etc/rc.d/devd b/etc/rc.d/devd
index 50c8a17..f025f9a 100644
--- a/etc/rc.d/devd
+++ b/etc/rc.d/devd
@@ -4,8 +4,8 @@
#
# PROVIDE: devd
-# REQUIRE: NETWORKING
-# BEFORE: mountcritremote
+# REQUIRE: netif
+# BEFORE: NETWORKING mountcritremote
# KEYWORD: nojail
. /etc/rc.subr
OpenPOWER on IntegriCloud