Selaa lähdekoodia

Test for predictable device names

Bob Mottram 8 vuotta sitten
vanhempi
commit
ee6925eeb6
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5
    2
      src/freedombone-utils-wifi

+ 5
- 2
src/freedombone-utils-wifi Näytä tiedosto

49
 # device names get assigned random names. This is a hacky workaround.
49
 # device names get assigned random names. This is a hacky workaround.
50
 # Also adding net.ifnames=0 to kernel options on bootloader may work.
50
 # Also adding net.ifnames=0 to kernel options on bootloader may work.
51
 function enable_predictable_device_names {
51
 function enable_predictable_device_names {
52
-    ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
53
-    update-initramfs -u
52
+    test_predictable=$(ls -la /etc/udev/rules.d/80-net-setup-link.rules)
53
+    if [[ "$test_predictable" != *"/dev/null" ]]; then
54
+        ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
55
+        update-initramfs -u
56
+    fi
54
 }
57
 }
55
 
58
 
56
 function wifi_is_running {
59
 function wifi_is_running {