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
This commit is contained in:
parent
09df718e0e
commit
491e9810c0
@ -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";
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user