27 lines
600 B
Plaintext
27 lines
600 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# $FreeBSD$
|
||
|
#
|
||
|
# Script called by devd(8) whenever a device appears or disappears.
|
||
|
#
|
||
|
# XXX this is a temporary hack that will go away soon
|
||
|
|
||
|
dev="$1"
|
||
|
startstop="$2"
|
||
|
|
||
|
driver="${dev%%[0-9]*}"
|
||
|
unit="${dev##*[^0-9]}"
|
||
|
|
||
|
if [ -z "$driver" -o -z "$unit" ]; then
|
||
|
echo "cannot parse device \"$dev\"" 1>&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
case "$driver" in
|
||
|
an|ar|awi|bge|cm|cnw|cs|dc|de|ed|el|em|ep|ex|fe|fxp|gem|gx|hme|ie|lge|lnc|my| \
|
||
|
nge|pcn|ray|rl|sf|sis|sk|sn|snc|ste|ti|tl|tx|txp|vr|vx|wb|wi|xe|xl)
|
||
|
# An ethernet interface; call pccard_ether to do the real work
|
||
|
/etc/pccard_ether "$dev" "$startstop"
|
||
|
;;
|
||
|
esac
|