From 27d22993baf6738f39bc74bebb17fd2256d0a4a3 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 20 Oct 2018 23:41:07 +0200 Subject: [PATCH] nss-mdns: do not unconditionally override hosts: line in nsswitch.conf Instead, add mdns4_minimal / mdns4 around the dns entry if missing. Signed-off-by: Peter Korsgaard --- package/nss-mdns/nss-mdns.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk index 63f40e718a..1512ea2e7f 100644 --- a/package/nss-mdns/nss-mdns.mk +++ b/package/nss-mdns/nss-mdns.mk @@ -9,8 +9,9 @@ NSS_MDNS_SITE = http://0pointer.de/lennart/projects/nss-mdns NSS_MDNS_LICENSE = LGPL-2.1+ NSS_MDNS_LICENSE_FILES = LICENSE +# add mdns4_minimal / mdns around the dns provider if missing define NSS_MDNS_INSTALL_CONFIG - sed -r -i -e 's/^(hosts:[[:space:]]+).*/\1files mdns4_minimal [NOTFOUND=return] dns mdns4/' \ + $(SED) '/^hosts:/ {/mdns4/! s/dns/mdns4_minimal [NOTFOUND=return] dns mdns4/}' \ $(TARGET_DIR)/etc/nsswitch.conf endef -- 2.30.2