]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hostapd: undo rename if dual interfaces are not supported.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 30 Jan 2015 16:39:34 +0000 (17:39 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 30 Jan 2015 16:39:34 +0000 (17:39 +0100)
lfs/hostapd
src/initscripts/init.d/hostapd

index d066db25671908cb50e4092151c00f9231fba793..74c2ae86ef37a644b8bbce04b51995ba374ca6e3 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 32
+PAK_VER    = 33
 
 DEPS       = ""
 
index 357452cede860ef077fa4553413d3f500e83aab1..1e7cec48097ee35f4cd1408ad5bb728d09c20fc0 100644 (file)
@@ -112,7 +112,12 @@ case "${1}" in
                        ip link set ${INTERFACE} name ${INTERFACE}_man
                        iw dev  ${INTERFACE}_man interface add ${INTERFACE} type __ap
                        evaluate_retval;
-                       /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf >/dev/null 2>&1 &
+                       if [ -d /sys/class/net/${INTERFACE} ]; then
+                               /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf >/dev/null 2>&1 &
+                       else
+                               ip link set ${INTERFACE}_man down
+                               ip link set ${INTERFACE}_man name ${INTERFACE}
+                       fi
                        exit 0;
                else
                        echo_ok