瀏覽代碼

wlan counting

Bob Mottram 8 年之前
父節點
當前提交
091db1eb1e
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    2
      src/freedombone-mesh-batman

+ 3
- 2
src/freedombone-mesh-batman 查看文件

36
     # counts the number of wlan devices
36
     # counts the number of wlan devices
37
     ctr=0
37
     ctr=0
38
 
38
 
39
-    for i in $(seq 0 -1 10); do
39
+    for i in $(seq 0 1 10); do
40
         if grep -q "wlan${i}" /proc/net/dev; then
40
         if grep -q "wlan${i}" /proc/net/dev; then
41
             ctr=$((ctr + 1))
41
             ctr=$((ctr + 1))
42
         fi
42
         fi
299
                 echo 'auth_algs=1' >> /etc/hostapd/hostapd.conf
299
                 echo 'auth_algs=1' >> /etc/hostapd/hostapd.conf
300
                 echo 'macaddr_acl=0' >> /etc/hostapd/hostapd.conf
300
                 echo 'macaddr_acl=0' >> /etc/hostapd/hostapd.conf
301
 
301
 
302
-                ifconfig $IFACE_SECONDARY up promisc
303
                 ifconfig $BRIDGE_HOTSPOT up
302
                 ifconfig $BRIDGE_HOTSPOT up
304
                 avahi-autoipd --force-bind --daemonize --wait $BRIDGE_HOTSPOT
303
                 avahi-autoipd --force-bind --daemonize --wait $BRIDGE_HOTSPOT
304
+                ifconfig $IFACE_SECONDARY up promisc
305
+                ifconfig $IFACE_SECONDARY auto-dhcp
305
             fi
306
             fi
306
         fi
307
         fi
307
     fi
308
     fi