[Buildroot] [PATCH v2 3/4] package/systemd: adopt odering in nsswitch to newer versions
Norbert Lange
nolange79 at gmail.com
Fri Dec 3 22:31:25 UTC 2021
This modifies the order of the nss modules, reflecting the current
state of the documentation.
nss-mymachines lost support for resolution of users and groups,
and now only does resolution of hostnames. Changed in v246.
Multiple changes in regards to nss-myhostname now recommend placement
after nss-files and before nss-dns. See commits ce266330, f918c67.
nss-resolve handles the nss-files logic itself, and its suggested to
move in front of nss-files. Changed in v249.
Signed-off-by: Norbert Lange <nolange79 at gmail.com>
---
package/systemd/systemd.mk | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 373e5c82bb..16202d4ac9 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -563,13 +563,11 @@ define SYSTEMD_INSTALL_NSSCONFIG_HOOK
-e '/^gshadow:/ {/systemd/! s/$$/ systemd/}' \
$(if $(BR2_PACKAGE_SYSTEMD_RESOLVED), \
-e '/^hosts:/ s/[[:space:]]*mymachines//' \
- -e '/^hosts:/ {/resolve/! s/files/files resolve [!UNAVAIL=return]/}' ) \
+ -e '/^hosts:/ {/resolve/! s/files/resolve [!UNAVAIL=return] files/}' ) \
$(if $(BR2_PACKAGE_SYSTEMD_MYHOSTNAME), \
- -e '/^hosts:/ {/myhostname/! s/$$/ myhostname/}' ) \
+ -e '/^hosts:/ {/myhostname/! s/files/files myhostname/}' ) \
$(if $(BR2_PACKAGE_SYSTEMD_MACHINED), \
- -e '/^passwd:/ {/mymachines/! s/files/files mymachines/}' \
- -e '/^group:/ {/mymachines/! s/files/files [SUCCESS=merge] mymachines/}' \
- -e '/^hosts:/ {/mymachines/! s/files/files mymachines/}' ) \
+ -e '/^hosts:/ {/mymachines/! s/^\(hosts:[[:space:]]*\)/\1 mymachines/}' ) \
$(TARGET_DIR)/etc/nsswitch.conf
endef
--
2.33.0
More information about the buildroot
mailing list