diff options
author | sam <sam@FreeBSD.org> | 2008-04-20 20:37:21 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-04-20 20:37:21 +0000 |
commit | f481193ee59aca9435a3482d984bfb08608df56a (patch) | |
tree | f7b8568250777904a49cfd2118ba88164d8c111c /etc/rc.d/wpa_supplicant | |
parent | d7668145d4f9b614366d70f9a87179256cedfd8b (diff) | |
download | FreeBSD-src-f481193ee59aca9435a3482d984bfb08608df56a.zip FreeBSD-src-f481193ee59aca9435a3482d984bfb08608df56a.tar.gz |
rc support for vaps
Diffstat (limited to 'etc/rc.d/wpa_supplicant')
-rw-r--r-- | etc/rc.d/wpa_supplicant | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/etc/rc.d/wpa_supplicant b/etc/rc.d/wpa_supplicant index 7e724f0..192ca96 100644 --- a/etc/rc.d/wpa_supplicant +++ b/etc/rc.d/wpa_supplicant @@ -30,18 +30,21 @@ is_wired_interface() test "$media" = "Ethernet" } -case ${ifn} in -ndis*) +is_ndis_interface() +{ + case `sysctl -n net.wlan.${1#wlan}.%parent 2>/dev/null` in + ndis*) true ;; + *) false ;; + esac +} + +if is_wired_interface ${ifn} ; then + driver="wired" +elif is_ndis_interface ${ifn} ; then driver="ndis" - ;; -*) - if is_wired_interface ${ifn} ; then - driver="wired" - else - driver="bsd" - fi - ;; -esac +else + driver="bsd" +fi load_rc_config $name @@ -50,5 +53,6 @@ conf_file=${wpa_supplicant_conf_file} pidfile="/var/run/${name}/${ifn}.pid" command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile" required_files=$conf_file +required_modules="wlan_wep wlan_tkip wlan_ccmp" run_rc_command "$1" |