summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-07-18 21:24:14 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-07-18 22:38:57 (GMT)
commitf2e610da5a8dfd37ec4a963f0c99496a304d0b26 (patch)
treed65de880f411678d4417caa324a17c1c540a9f99
parenta8a7960c3184bb97a8a60704cd4ba9b2c523188c (diff)
downloadbuildroot-f2e610da5a8dfd37ec4a963f0c99496a304d0b26.tar.gz
buildroot-f2e610da5a8dfd37ec4a963f0c99496a304d0b26.tar.bz2
package/nss-mdns: do not overwrite user's nsswitch.conf
Instead of over-writing the nsswitch.conf file (which may already contain user's specific configuration if it comes from a custom skeleton), just replace the 'hosts' line. Remove now-useless custom nsswitch.conf file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/nss-mdns/nss-mdns.mk3
-rw-r--r--package/nss-mdns/nsswitch.conf15
2 files changed, 2 insertions, 16 deletions
diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk
index 4d36633..83d9a2a 100644
--- a/package/nss-mdns/nss-mdns.mk
+++ b/package/nss-mdns/nss-mdns.mk
@@ -10,7 +10,8 @@ NSS_MDNS_SITE=http://0pointer.de/lennart/projects/nss-mdns
NSS_MDNS_CONF_OPT += --localstatedir=/var
define NSS_MDNS_INSTALL_CONFIG
- $(INSTALL) -D -m 0664 package/nss-mdns/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf
+ sed -r -i -e 's/^(hosts:[[:space:]]+).*/\1files mdns4_minimal [NOTFOUND=return] dns mdns4/' \
+ $(TARGET_DIR)/etc/nsswitch.conf
endef
NSS_MDNS_POST_INSTALL_TARGET_HOOKS += NSS_MDNS_INSTALL_CONFIG
diff --git a/package/nss-mdns/nsswitch.conf b/package/nss-mdns/nsswitch.conf
deleted file mode 100644
index 94174e0..0000000
--- a/package/nss-mdns/nsswitch.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# /etc/nsswitch.conf
-
-passwd: compat
-group: compat
-shadow: compat
-
-hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
-networks: files
-
-protocols: db files
-services: db files
-ethers: db files
-rpc: db files
-
-netgroup: nis