3
0
Fork 0
forked from mirrors/nixpkgs

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>
This commit is contained in:
aszlig 2014-08-17 06:46:41 +02:00
parent 474731b29e
commit 6ebe4a6a52
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

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