Skip to contentSkip to conversation

eudev: allow for predictable network interface names

PATCH In review [email protected] 2 participants 2 messages Feb 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 eudev: allow for predictable network interface names

From: Joe Slater <[email protected]>

Do not suppress renaming by eudev if 'pni-names' is a distro feature. The previous behavior was to always suppress renaming.

eudev is used when sysvinit is the init manager.

---
 meta/recipes-core/udev/eudev_3.2.14.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/udev/eudev_3.2.14.bb +4 -3
index ddb3c3340f..5c522d0db7 100644
@@ -49,9 +49,10 @@ do_install:append() {
 	install -d ${D}${sysconfdir}/udev/rules.d
 	install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
 
-	# Use classic network interface naming scheme
-	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
+	# Use classic network interface naming scheme if no 'pni-names' distro feature
+	if ! ${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', 'true', 'false', d)}; then
+		touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+	fi
 }
 
 do_install:prepend:class-target () {
Signature · 1 line
2.25.1
#1 lore raw
Quoted 40 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Joe Slater via lists.openembedded.org
Sent: den 5 februari 2024 16:33
To: [email protected]
Cc: [email protected]; [email protected]
Subject: [v2][oe-core][PATCH 1/1] eudev: allow for predictable network interface names

From: Joe Slater <[email protected]>

Do not suppress renaming by eudev if 'pni-names' is a distro feature. The previous behavior was to always suppress renaming.

eudev is used when sysvinit is the init manager.

---
 meta/recipes-core/udev/eudev_3.2.14.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-core/udev/eudev_3.2.14.bb +0 -0

core/udev/eudev_3.2.14.bb
index ddb3c3340f..5c522d0db7 100644

meta/recipes-core/udev/eudev_3.2.14.bb +4 -4
@@ -49,9 +49,10 @@ do_install:append() {
 	install -d ${D}${sysconfdir}/udev/rules.d
 	install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
 
-	# Use classic network interface naming scheme
-	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
+	# Use classic network interface naming scheme if no 'pni-names' distro feature
+	if ! ${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', 'true', 'false', d)}; then
+		touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+	fi
 }
 
 do_install:prepend:class-target () {
--
Quoted 1 line

2.25.1

While I appreciate the effort after my comments, the original patch has already been merged.

//Peter