Bob Mottram пре 7 година
родитељ
комит
2733e46d67
3 измењених фајлова са 16 додато и 0 уклоњено
  1. 1
    0
      src/freedombone-image-customise
  2. 3
    0
      src/freedombone-utils-setup
  3. 12
    0
      src/freedombone-utils-wifi

+ 1
- 0
src/freedombone-image-customise Прегледај датотеку

@@ -612,6 +612,7 @@ initialise_mesh() {
612 612
 
613 613
     chroot "$rootdir" apt-get -yq install apt-transport-https
614 614
 
615
+    enable_predictable_device_names
615 616
     configure_firewall
616 617
     install_avahi
617 618
     install_batman

+ 3
- 0
src/freedombone-utils-setup Прегледај датотеку

@@ -660,6 +660,9 @@ function setup_utils {
660 660
     function_check remove_management_engine_interface
661 661
     remove_management_engine_interface
662 662
 
663
+    function_check enable_predictable_device_names
664
+    enable_predictable_device_names
665
+
663 666
     function_check separate_tmp_filesystem
664 667
     separate_tmp_filesystem 150
665 668
 

+ 12
- 0
src/freedombone-utils-wifi Прегледај датотеку

@@ -39,6 +39,18 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
39 39
 # repo for atheros AR9271 wifi driver
40 40
 ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
41 41
 
42
+# Debian stretch has a problem where the formerly predictable wlan0 and eth0
43
+# device names get assigned random names. This is a hacky workaround.
44
+function enable_predictable_device_names {
45
+    if [ $rootdir ]; then
46
+        chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
47
+        chroot "$rootdir" update-initramfs -u
48
+    else
49
+        ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
50
+        update-initramfs -u
51
+    fi
52
+}
53
+
42 54
 function wifi_is_running {
43 55
     wifi_state=$(wpa_cli status)
44 56
     if [[ "$wifi_state" == *"COMPLETED"* ]]; then