Commit a2c8dd31 authored by Christian Hesse's avatar Christian Hesse 😜 Committed by David Runge
Browse files

archiso_pxe_common: remove resolv.conf before copy

Booting via PXE we want to keep our DNS configuration. So remove
/etc/resolv.conf in new root before copying the current file.

Without this systemd-resolved fallback nameservers are used and we see an
error message when the root ships a symbolic link to systemd-resolved's
stub-resolv.conf:

cp: not writing through dangling symlink '/new_root/etc/resolv.conf'
parent b30d1cad
Pipeline #4856 passed with stage
in 23 seconds
......@@ -73,6 +73,7 @@ run_latehook () {
ip link set "${netdev}" down
done
elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then
rm -f /new_root/etc/resolv.conf
cp /etc/resolv.conf /new_root/etc/resolv.conf
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment