소스 검색

Predictable device names

Bob Mottram 8 년 전
부모
커밋
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
 
612
 
613
     chroot "$rootdir" apt-get -yq install apt-transport-https
613
     chroot "$rootdir" apt-get -yq install apt-transport-https
614
 
614
 
615
+    enable_predictable_device_names
615
     configure_firewall
616
     configure_firewall
616
     install_avahi
617
     install_avahi
617
     install_batman
618
     install_batman

+ 3
- 0
src/freedombone-utils-setup 파일 보기

660
     function_check remove_management_engine_interface
660
     function_check remove_management_engine_interface
661
     remove_management_engine_interface
661
     remove_management_engine_interface
662
 
662
 
663
+    function_check enable_predictable_device_names
664
+    enable_predictable_device_names
665
+
663
     function_check separate_tmp_filesystem
666
     function_check separate_tmp_filesystem
664
     separate_tmp_filesystem 150
667
     separate_tmp_filesystem 150
665
 
668
 

+ 12
- 0
src/freedombone-utils-wifi 파일 보기

39
 # repo for atheros AR9271 wifi driver
39
 # repo for atheros AR9271 wifi driver
40
 ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
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
 function wifi_is_running {
54
 function wifi_is_running {
43
     wifi_state=$(wpa_cli status)
55
     wifi_state=$(wpa_cli status)
44
     if [[ "$wifi_state" == *"COMPLETED"* ]]; then
56
     if [[ "$wifi_state" == *"COMPLETED"* ]]; then