2 # Common configuration settings for vap test scripts.
9 ifconfig $1 2>/dev/null | while read line; do
22 # Auto-detect WIRED and WIRELESS.
23 # NB: takes first device of each type; to fix
24 # either specify them before . config.
26 for i in `ifconfig -l`; do
27 case `media_type $i` in
29 test -z "$WIRED" && WIRED=$i
32 test -z "$WIRELESS" && WIRELESS=$i
36 test -z "$WIRED" && { echo "No wired device detected!"; exit; }
37 test -z "$WIRELESS" && { echo "No wireless device detected!"; exit; }
41 #CHANNEL=${1:-36:ht/20}
46 # default WPA passphrase
47 test -z "$WPA_PASSPHRASE" && WPA_PASSPHRASE='I am not a geek'
49 # default ssid for ap vaps
50 test -z "$SSID" && SSID=freebsd-ap
52 # default meshid for mesh vaps
53 test -z "$MESHID" && MESHID=freebsd-mesh
55 # directory to create files like hostapd.conf
56 test -z "$TMPDIR" && TMPDIR=.
58 test -z "$HOSTAPD_CTRL_INTERFACE" && HOSTAPD_CTRL_INTERFACE=/var/run/hostapd
60 # applications (may want ../ for wlan test apps)
61 test -z "$HOSTAPD" && HOSTAPD=/usr/sbin/hostapd
62 test -z "$WLANWATCH" && WLANWATCH=/usr/local/bin/wlanwatch
63 test -z "$WLANWDS" && WLANWDS=/usr/local/bin/wlanwds
67 for m in wlan_xauth wlan_ccmp wlan_tkip wlan_wep; do
68 kldstat -q -m $m || kldload $m