mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 16:10:55 +00:00
add support wired interfaces
MFC after: 2 weeks
This commit is contained in:
parent
ca7413e364
commit
49658ca926
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178021
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue