add support wired interfaces

MFC after:	2 weeks
This commit is contained in:
Sam Leffler 2008-04-08 23:00:04 +00:00
parent ca7413e364
commit 49658ca926
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178021

View File

@ -20,12 +20,28 @@ if [ -z "$ifn" ]; then
return 1
fi
is_wired_interface()
{
media=`ifconfig $1 2>/dev/null | while read line; do
case "$line" in
*media:?Ethernet*)
echo Ethernet
;;
esac
done`
test "$media" = "Ethernet"
}
case ${ifn} in
ndis*)
driver="ndis"
;;
*)
driver="bsd"
if is_wired_interface ${ifn} ; then
driver="wired"
else
driver="bsd"
fi
;;
esac