From 6ebe4a6a523bbab3388453ac119ab08e295a7e06 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 17 Aug 2014 06:46:41 +0200 Subject: [PATCH] nixos-install: Fix copying symlink resolv.conf. On some non-NixOS systems (for example those using "resolvconf"), /etc/resolv.conf is a symlink. So let's dereference when copying hasts and resolv.conf. Signed-off-by: aszlig --- nixos/modules/installer/tools/nixos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh index 9d62ba131dc7..a55eda1cb8fd 100644 --- a/nixos/modules/installer/tools/nixos-install.sh +++ b/nixos/modules/installer/tools/nixos-install.sh @@ -81,7 +81,7 @@ mount -t tmpfs -o "mode=0755" none $mountPoint/var/setuid-wrappers rm -rf $mountPoint/var/run ln -s /run $mountPoint/var/run rm -f $mountPoint/etc/{resolv.conf,hosts} -cp -f /etc/resolv.conf /etc/hosts $mountPoint/etc/ +cp -Lf /etc/resolv.conf /etc/hosts $mountPoint/etc/ if [ -n "$runChroot" ]; then