From: Joe Slater Date: Wed, 31 Jan 2024 18:53:42 +0000 (-0800) Subject: eudev: allow for predictable network interface names X-Git-Tag: uninative-4.4~285 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc7cd56df85f28f2a3a3dd97730d475522b7b0f7;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git eudev: allow for predictable network interface names 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/udev/eudev_3.2.14.bb b/meta/recipes-core/udev/eudev_3.2.14.bb index ddb3c3340f6..18696679c8e 100644 --- a/meta/recipes-core/udev/eudev_3.2.14.bb +++ b/meta/recipes-core/udev/eudev_3.2.14.bb @@ -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 () {