Files
poky/meta/recipes-core
Koen Kooi 9352450dfa systemd: stop enabling non-standard MAC policy when using the 'pni-names' DISTRO_FEATURE
This recipe enabled an additional, non-standard policy for predictable
network names: the MAC policy. This is a deviation from upstream
policies and in cases where no MAC address is available, it makes it
actively worse by changing the name(s) every boot.

Change the logic to disable predictable naming when the DISTRO_FEATURE
isn't enabled and only use upstream logic with it *is* enabled.

For DISTROs that wish to use non-standard policies, a DISTRO layer is the correct place.
E.g. in DISTRO_LAYER/recipes-core/systemd/systemd_%.bbappend:

do_install:append:DISTRO() {
       if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then
               if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then
                       sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link
               fi
               if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then
                       sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link
               fi
}

(From OE-Core rev: 9b34a810496f4b769394aa6ba7c0f6013d18ccc8)

Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-09-08 14:05:11 +01:00
..
2025-08-07 12:11:16 +01:00
2025-08-14 10:31:10 +01:00
2025-03-28 11:19:40 +00:00
2025-06-20 12:07:27 +01:00
2025-08-21 10:29:56 +01:00
2025-08-06 17:01:23 +01:00
2025-06-05 11:02:22 +01:00
2025-08-25 17:47:20 +01:00
2025-07-28 17:37:02 +01:00
2025-07-03 10:40:17 +01:00