From e34b05dc4c5c8b48cbc0428b29344f7634b3b4a5 Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Fri, 25 Jan 2013 11:47:47 -0500 Subject: Port new net_id capabilities from systemd-udev-197 Signed-off-by: Anthony G. Basile --- rules/80-net-name-slot.rules | 11 +++++++++++ rules/Makefile.am | 1 + 2 files changed, 12 insertions(+) create mode 100644 rules/80-net-name-slot.rules (limited to 'rules') diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules new file mode 100644 index 0000000000..2834e82dbf --- /dev/null +++ b/rules/80-net-name-slot.rules @@ -0,0 +1,11 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="net_name_slot_end" +SUBSYSTEM!="net", GOTO="net_name_slot_end" +NAME!="", 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" diff --git a/rules/Makefile.am b/rules/Makefile.am index 6adbd6e469..1741bd2ed8 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -16,6 +16,7 @@ dist_udevrules_DATA = \ 75-probe_mtd.rules \ 75-tty-description.rules \ 78-sound-card.rules \ + 80-net-name-slot.rules \ 95-udev-late.rules if HAVE_MODULES -- cgit v1.2.3-54-g00ecf