summaryrefslogtreecommitdiffstats
path: root/etc/devd.conf
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-08-02 18:28:31 +0000
committersam <sam@FreeBSD.org>2005-08-02 18:28:31 +0000
commit84822f3de1d8125f2f76c02eeeb10111ea64244d (patch)
tree3344f31b8f662f1653d7d85c22edcb71ae2f6046 /etc/devd.conf
parentf859ef367bb9da51d548ce2541ded64582b4bfd7 (diff)
downloadFreeBSD-src-84822f3de1d8125f2f76c02eeeb10111ea64244d.zip
FreeBSD-src-84822f3de1d8125f2f76c02eeeb10111ea64244d.tar.gz
eliminate the regex used to match ethernet and 802.11 devices;
instead use the interface's media-type Reviewed by: imp MFC after: 1 week
Diffstat (limited to 'etc/devd.conf')
-rw-r--r--etc/devd.conf32
1 files changed, 23 insertions, 9 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index e55a5d9..3cd9eee 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -18,12 +18,6 @@ options {
# Setup some shorthand for regex that we use later in the file.
#XXX Yes, these are gross -- imp
- set ethernet-nic-regex
- "(an|ar|ath|aue|awi|axe|bfe|bge|cdce|cm|cnw|cs|cue|dc|de|ed|el|\
- em|ep|ex|fe|fxp|gem|hme|ie|ipw|iwi|kue|lge|lnc|my|nge|pcn|ral|\
- ray|re|rl|rue|sf|sis|sk|sn|snc|ste|ti|tl|tx|txp|udav|ural|vge|\
- vr|vx|wb|wi|xe|xl)\
- [0-9]+";
set scsi-controller-regex
"(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\
esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\
@@ -38,12 +32,12 @@ options {
# a historical accident, this script is called pccard_ether.
#
attach 0 {
- device-name "$ethernet-nic-regex";
+ media-type "ethernet";
action "/etc/pccard_ether $device-name start";
};
detach 0 {
- device-name "$ethernet-nic-regex";
+ media-type "ethernet";
action "/etc/pccard_ether $device-name stop";
};
@@ -55,8 +49,28 @@ detach 0 {
#
notify 0 {
match "system" "IFNET";
- match "subsystem" "$ethernet-nic-regex";
match "type" "LINK_UP";
+ media-type "ethernet";
+ action "/etc/rc.d/dhclient start $subsystem";
+};
+
+#
+# Like Ethernet devices, but separate because
+# they have a different media type. We may want
+# to exploit this later.
+#
+detach 0 {
+ media-type "802.11";
+ action "/etc/pccard_ether $device-name stop";
+};
+attach 0 {
+ media-type "802.11";
+ action "/etc/pccard_ether $device-name start";
+};
+notify 0 {
+ match "system" "IFNET";
+ match "type" "LINK_UP";
+ media-type "802.11";
action "/etc/rc.d/dhclient start $subsystem";
};
OpenPOWER on IntegriCloud