diff options
author | sam <sam@FreeBSD.org> | 2008-04-08 23:00:04 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-04-08 23:00:04 +0000 |
commit | e3d4b6466f639d64e83b6fc7b70ba0a5598257c2 (patch) | |
tree | 4cfabe0fd295cc3ae98d79d66c6f443bde98a816 /etc | |
parent | d6050d62912ed7a937ed5fde61b6e26ae4f75528 (diff) | |
download | FreeBSD-src-e3d4b6466f639d64e83b6fc7b70ba0a5598257c2.zip FreeBSD-src-e3d4b6466f639d64e83b6fc7b70ba0a5598257c2.tar.gz |
add support wired interfaces
MFC after: 2 weeks
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/wpa_supplicant | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/rc.d/wpa_supplicant b/etc/rc.d/wpa_supplicant index 3f83460..044380c 100644 --- a/etc/rc.d/wpa_supplicant +++ b/etc/rc.d/wpa_supplicant @@ -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 |