diff options
author | Tino Breddin <tino@daogames.com> | 2014-11-30 10:37:18 +0100 |
---|---|---|
committer | Luca Bruno <lucabru@src.gnome.org> | 2014-12-05 17:32:36 +0100 |
commit | ee0f81de5ef04d8ef54041e022c25f820bbb7bc1 (patch) | |
tree | 39af81592ef4b5080b2c2530ea615512490b71e1 /nixos/modules/services/hardware/80-net-setup-link.rules | |
parent | e5d92d45b7917350e6f2f262f9871c5d46f7719e (diff) | |
download | nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar.gz nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar.bz2 nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar.lz nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar.xz nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.tar.zst nixlib-ee0f81de5ef04d8ef54041e022c25f820bbb7bc1.zip |
Fix filename for udev network interface rules
From http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)
Diffstat (limited to 'nixos/modules/services/hardware/80-net-setup-link.rules')
-rw-r--r-- | nixos/modules/services/hardware/80-net-setup-link.rules | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/80-net-setup-link.rules b/nixos/modules/services/hardware/80-net-setup-link.rules new file mode 100644 index 000000000000..18547f170a3f --- /dev/null +++ b/nixos/modules/services/hardware/80-net-setup-link.rules @@ -0,0 +1,13 @@ +# Copied from systemd 203. +ACTION=="remove", GOTO="net_name_slot_end" +SUBSYSTEM!="net", GOTO="net_name_slot_end" +NAME!="", GOTO="net_name_slot_end" + +IMPORT{cmdline}="net.ifnames" +ENV{net.ifnames}=="0", GOTO="net_name_slot_end" + +NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}" +NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}" +NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}" + +LABEL="net_name_slot_end" |