diff options
author | Joe Slater <joe.slater@windriver.com> | 2024-03-21 13:23:11 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-23 10:16:56 +0000 |
commit | 37bd8e8dddce9d0b5bfbcf9244225c3b853d7077 (patch) | |
tree | 17ca46850134748aed13e7a026beb4ad6a29e033 | |
parent | 240b3db72343f20f354f2681da48946da04c3260 (diff) | |
download | openembedded-core-37bd8e8dddce9d0b5bfbcf9244225c3b853d7077.tar.gz |
systemd: enable mac based names in NamePolicy
Some BSPs only provide information to construct a
predictable network interface named based on a mac
address, so we enable that NamePolicy option.
This policy has been adopted for sysvinit as of
commit 4a7b42fcf6981d3120c08091a7ed3d4d7bcd41f0.
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-NamePolicy.patch | 33 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_255.4.bb | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch b/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch new file mode 100644 index 0000000000..46955cbcbb --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch @@ -0,0 +1,33 @@ +From 9bb09886320eb286108fb370b2634a66b3e3b9ff Mon Sep 17 00:00:00 2001 +From: Joe Slater <joe.slater@windriver.com> +Date: Thu, 21 Mar 2024 16:28:31 +0000 +Subject: [PATCH] systemd: enable mac based names in NamePolicy + +The default NamePolicy for network interface names does not +include names based on mac addresses. Some BSPs, though, do +not provide information to compute other names, so we enable +mac names as a last resort. + +Upstream-Status: Inappropriate [enable feature] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> +--- + network/99-default.link | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/network/99-default.link b/network/99-default.link +index 429ac31e80..543ce54661 100644 +--- a/network/99-default.link ++++ b/network/99-default.link +@@ -15,6 +15,6 @@ + OriginalName=* + + [Link] +-NamePolicy=keep kernel database onboard slot path +-AlternativeNamesPolicy=database onboard slot path ++NamePolicy=keep kernel database onboard slot path mac ++AlternativeNamesPolicy=database onboard slot path mac + MACAddressPolicy=persistent +-- +2.35.5 + diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.4.bb index bcef3e6b7a..b02e44d9c0 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_255.4.bb @@ -28,6 +28,7 @@ SRC_URI += " \ file://systemd-pager.sh \ file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0008-implment-systemd-sysv-install-for-OE.patch \ + file://0001-NamePolicy.patch \ " # patches needed by musl |