diff options
Diffstat (limited to 'sbin/devd/devd-generic')
-rw-r--r-- | sbin/devd/devd-generic | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sbin/devd/devd-generic b/sbin/devd/devd-generic new file mode 100644 index 0000000..c75779d --- /dev/null +++ b/sbin/devd/devd-generic @@ -0,0 +1,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 |