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>
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
+++ /dev/null
-# /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