浏览代码

No ap_scan

Bob Mottram 8 年前
父节点
当前提交
74640a2a9a
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8
    3
      src/freedombone-utils-wifi

+ 8
- 3
src/freedombone-utils-wifi 查看文件

328
     echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
328
     echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
329
     echo "  wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
329
     echo "  wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
330
 
330
 
331
-    echo 'network={' > $WIFI_CONFIG
332
-    echo "  ssid=\"${ssid}\"" >> $WIFI_CONFIG
331
+    echo 'update_config=1' > $WIFI_CONFIG
332
+    echo 'eapol_version=1' >> $WIFI_CONFIG
333
+    echo '' >> $WIFI_CONFIG
334
+
335
+    echo 'network={' >> $WIFI_CONFIG
336
+    if [[ "${ssid}" != $'any' && "${ssid}" != $'all' && "${ssid}" != $'open' ]]; then
337
+        echo "  ssid=\"${ssid}\"" >> $WIFI_CONFIG
338
+    fi
333
     echo '  key_mgmt=NONE' >> $WIFI_CONFIG
339
     echo '  key_mgmt=NONE' >> $WIFI_CONFIG
334
     echo '}' >> $WIFI_CONFIG
340
     echo '}' >> $WIFI_CONFIG
335
 
341
 
370
     fi
376
     fi
371
 
377
 
372
     echo 'update_config=1' > $WIFI_CONFIG
378
     echo 'update_config=1' > $WIFI_CONFIG
373
-    echo 'ap_scan=2' >> $WIFI_CONFIG
374
     echo 'eapol_version=1' >> $WIFI_CONFIG
379
     echo 'eapol_version=1' >> $WIFI_CONFIG
375
     echo '' >> $WIFI_CONFIG
380
     echo '' >> $WIFI_CONFIG
376
 
381