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.

(From OE-Core rev: dc7cd56df85f28f2a3a3dd97730d475522b7b0f7)

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>
This commit is contained in:
Joe Slater
2024-01-31 10:53:42 -08:00
committed by Richard Purdie
parent e1984c2e46
commit 78c99af22c

View 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 () {