summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/glibc/nsswitch.conf (renamed from system/skeleton/etc/nsswitch.conf)0
-rw-r--r--toolchain/toolchain.mk10
2 files changed, 10 insertions, 0 deletions
diff --git a/system/skeleton/etc/nsswitch.conf b/package/glibc/nsswitch.conf
index d81e2f053e..d81e2f053e 100644
--- a/system/skeleton/etc/nsswitch.conf
+++ b/package/glibc/nsswitch.conf
diff --git a/toolchain/toolchain.mk b/toolchain/toolchain.mk
index 8fe06ffa5b..3f9900ba18 100644
--- a/toolchain/toolchain.mk
+++ b/toolchain/toolchain.mk
@@ -3,6 +3,16 @@
# TARGET_FINALIZE_HOOKS, to be applied just after all packages
# have been built.
+# Install default nsswitch.conf file if the skeleton doesn't provide it
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
+define GLIBC_COPY_NSSWITCH_FILE
+ $(Q)if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \
+ $(INSTALL) -D -m 0644 package/glibc/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf ; \
+ fi
+endef
+TARGET_FINALIZE_HOOKS += GLIBC_COPY_NSSWITCH_FILE
+endif
+
# Install the gconv modules
ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y)
GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST))
OpenPOWER on IntegriCloud