]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/hostapd
hostap detections also match to cardbus cards.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / hostapd
index ae1150ed661b7490c41396372260df7a3b92cdde..9a400823d989da9530e73fe471d2fd758c0d44ff 100644 (file)
@@ -40,6 +40,9 @@ case "${1}" in
                elif [ -e "/sys/class/net/$INTERFACE/madwifi_name_type" ]; then
                        DRIVER="MADWIFI"
                        driver="madwifi"
+               elif [ "$(/bin/grep hostap /sys/class/net/$INTERFACE/uevent)" != "" ]; then
+                       DRIVER="HOSTAP"
+                       driver="hostap"
                else
                        boot_mesg "Interface $INTERFACE is a not supported wireless device." ${FAILURE}
                        echo_failure
@@ -63,6 +66,12 @@ case "${1}" in
                                /usr/bin/wlanconfig $INTERFACE destroy > /dev/null
                                /usr/bin/wlanconfig $INTERFACE create wlandev wifi0 wlanmode ap > /dev/null
                        fi
+               elif [ "$DRIVER" == "HOSTAP" ]; then
+                       if [ "$(/usr/sbin/iwconfig $INTERFACE | /bin/grep "Mode:Master")" == "" ]; then
+                               boot_mesg "Setting HOSTAP wlan $INTERFACE to Master mode... "
+                               # Set Prism Cards to master mode
+                               /usr/bin/iwconfig $INTERFACE mode master > /dev/null
+                       fi
                fi
 
                /usr/sbin/iwconfig $INTERFACE channel $CHANNEL
@@ -93,8 +102,6 @@ case "${1}" in
                        echo_failure;
                        exit 0;
                else
-                       # enable wlan module of collectd
-                       sed -i -e "s|#LoadPlugin wireless|LoadPlugin wireless|g" /etc/collectd.conf
                        echo_ok
                fi
                ;;