17094c
From 1ade0d247fda747ed33632a7746f9278b74feaa8 Mon Sep 17 00:00:00 2001
17094c
From: Beniamino Galvani <bgalvani@redhat.com>
17094c
Date: Mon, 23 Mar 2020 22:57:35 +0100
17094c
Subject: [PATCH] network-manager: install libnss DNS and mDNS plugins
17094c
17094c
Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name
17094c
Service Switch (NSS) functionality of glibc so that name resolution
17094c
through /etc/resolv.conf and mDNS works in the initrd.
17094c
17094c
Fixes: #772
17094c
17094c
Cherry-picked from: 87bffc36e72c121024df033e1a78799456c73523
17094c
Resolves: #1826061
17094c
---
17094c
 modules.d/35network-manager/module-setup.sh | 5 +++++
17094c
 1 file changed, 5 insertions(+)
17094c
17094c
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
17094c
index d6d0f9ce..8fc3114d 100755
17094c
--- a/modules.d/35network-manager/module-setup.sh
17094c
+++ b/modules.d/35network-manager/module-setup.sh
17094c
@@ -51,4 +51,9 @@ install() {
17094c
     if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then
17094c
         inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so"
17094c
     fi
17094c
+
17094c
+    _arch=${DRACUT_ARCH:-$(uname -m)}
17094c
+
17094c
+    inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
17094c
+        {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
17094c
 }
17094c