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>
This commit is contained in:
Yann E. MORIN 2013-07-18 23:24:14 +02:00 committed by Peter Korsgaard
parent a8a7960c31
commit f2e610da5a
2 changed files with 2 additions and 16 deletions

View File

@ -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

View File

@ -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