aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-04-19 11:42:39 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-04-19 11:42:39 +0000
commitc951bb10d6c0c003a995268ecac43f7d49d5fd00 (patch)
treee3de2b5dbfb6220ad3e0893321ff8db9468e0fd8 /package/madwifi/files
parent9384678f1668a8fe6eea6e574b4a37e783294897 (diff)
downloadupstream-c951bb10d6c0c003a995268ecac43f7d49d5fd00.tar.gz
upstream-c951bb10d6c0c003a995268ecac43f7d49d5fd00.tar.bz2
upstream-c951bb10d6c0c003a995268ecac43f7d49d5fd00.zip
don't try to set up wpa if hostapd is not installed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7005 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/files')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 15e7850eb9..69874b5c18 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -194,13 +194,15 @@ enable_atheros() {
iwconfig "$ifname" essid "$ssid"
case "$mode" in
ap)
- hostapd_setup_vif "$vif" madwifi || {
- echo "enable_atheros($device): Failed to set up wpa for interface $ifname" >&2
- # make sure this wifi interface won't accidentally stay open without encryption
- ifconfig "$ifname" down
- wlanconfig "$ifname" destroy
- continue
- }
+ if eval "type hostapd_setup_vif" 2>/dev/null >/dev/null; then
+ hostapd_setup_vif "$vif" madwifi || {
+ echo "enable_atheros($device): Failed to set up wpa for interface $ifname" >&2
+ # make sure this wifi interface won't accidentally stay open without encryption
+ ifconfig "$ifname" down
+ wlanconfig "$ifname" destroy
+ continue
+ }
+ fi
;;
wds|sta)
case "$enc" in