summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-08-17 06:46:41 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-08-17 06:46:41 +0200
commit6ebe4a6a523bbab3388453ac119ab08e295a7e06 (patch)
tree0d671ca2979607cee9f66ce5fa21dea9e6f131eb /nixos/modules/installer
parent474731b29e81f0e1a0e2962e44a1c208c4628d04 (diff)
downloadnixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar.gz
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar.bz2
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar.lz
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar.xz
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.tar.zst
nixlib-6ebe4a6a523bbab3388453ac119ab08e295a7e06.zip
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-install.sh2
1 files changed, 1 insertions, 1 deletions
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