Test for predictable device names
This commit is contained in:
parent
90dc589eb9
commit
ee6925eeb6
|
@ -49,8 +49,11 @@ function default_network_config {
|
||||||
# device names get assigned random names. This is a hacky workaround.
|
# device names get assigned random names. This is a hacky workaround.
|
||||||
# Also adding net.ifnames=0 to kernel options on bootloader may work.
|
# Also adding net.ifnames=0 to kernel options on bootloader may work.
|
||||||
function enable_predictable_device_names {
|
function enable_predictable_device_names {
|
||||||
|
test_predictable=$(ls -la /etc/udev/rules.d/80-net-setup-link.rules)
|
||||||
|
if [[ "$test_predictable" != *"/dev/null" ]]; then
|
||||||
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
|
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
|
||||||
update-initramfs -u
|
update-initramfs -u
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function wifi_is_running {
|
function wifi_is_running {
|
||||||
|
|
Loading…
Reference in New Issue