]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
eudev: allow for predictable network interface names
authorJoe Slater <joe.slater@windriver.com>
Wed, 31 Jan 2024 18:53:42 +0000 (10:53 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Feb 2024 21:52:15 +0000 (21:52 +0000)
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.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/eudev_3.2.14.bb

index ddb3c3340f6b2839961849b918b7cad05e303a97..18696679c8ec0c731423454425007ba78bfc2137 100644 (file)
@@ -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', 'false', 'true', d)}; then
+               touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+       fi
 }
 
 do_install:prepend:class-target () {