#
# Override the system defaults of devd so that configd receives
# both LINK_UP and LINK_DOWN events on wired and wireless devices.
#

notify 101 {
        match "system"          "IFNET";
        match "type"            "LINK_UP";
        media-type              "ethernet";
	action "/usr/local/sbin/configctl interface linkup start $subsystem";
};

notify 101 {
        match "system"          "IFNET";
	match "type"            "LINK_DOWN";
	media-type              "ethernet";
	action "/usr/local/sbin/configctl interface linkup stop $subsystem";
};

notify 101 {
        match "system"          "IFNET";
        match "type"            "LINK_UP";
	media-type              "802.11";
	action "/usr/local/sbin/configctl interface linkup start $subsystem";
};

notify 101 {
        match "system"          "IFNET";
        match "type"            "LINK_DOWN";
	media-type              "802.11";
	action "/usr/local/sbin/configctl interface linkup stop $subsystem";
};

#
# While there, disable the invoke of /etc/pccard_ether to avoid
# rc scripts from reconfiguring the system into an unknown state.
#

notify 101 {
	match "system"		"IFNET";
	match "subsystem"	"!usbus[0-9]+";
	match "type"		"ATTACH";
};

detach 101 {
	media-type "802.11";
};

attach 101 {
	media-type "802.11";
};
