Skip to content
Snippets Groups Projects
Commit a2c8dd31 authored by Christian Hesse's avatar Christian Hesse :stuck_out_tongue_winking_eye: 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
No related branches found
No related tags found
1 merge request!123archiso_pxe_common: remove resolv.conf before copy
Pipeline #4856 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment