浏览代码

Roaming dhcp

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

+ 9
- 0
src/freedombone-utils-wifi 查看文件

@@ -301,6 +301,9 @@ function wifi_wpa2_psk {
301 301
     echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
302 302
     echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
303 303
     echo "  wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
304
+    echo '' >> /etc/network/interfaces
305
+    echo '#this line must always be here' >> /etc/network/interfaces
306
+    echo 'iface default inet dhcp' >> /etc/network/interfaces
304 307
 
305 308
     wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
306 309
 
@@ -327,6 +330,9 @@ function wifi_none {
327 330
     echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
328 331
     echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
329 332
     echo "  wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
333
+    echo '' >> /etc/network/interfaces
334
+    echo '#this line must always be here' >> /etc/network/interfaces
335
+    echo 'iface default inet dhcp' >> /etc/network/interfaces
330 336
 
331 337
     echo 'update_config=1' > $WIFI_CONFIG
332 338
     echo 'eapol_version=1' >> $WIFI_CONFIG
@@ -369,6 +375,9 @@ function networks_from_file {
369 375
     echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
370 376
     echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
371 377
     echo "  wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
378
+    echo '' >> /etc/network/interfaces
379
+    echo '#this line must always be here' >> /etc/network/interfaces
380
+    echo 'iface default inet dhcp' >> /etc/network/interfaces
372 381
 
373 382
     # remove wpa_supplicant.conf if it exists
374 383
     if [ -f $WIFI_CONFIG ]; then