summaryrefslogtreecommitdiffstats
path: root/sbin/devd/devd-generic
blob: c75779db2e035eef5c001c5575b47fc53c36f590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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
OpenPOWER on IntegriCloud