From 91d31c00527154fc2ca6ecad5fadabc24bcf76d3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 18 Jan 2021 11:07:14 +0100 Subject: 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' --- hooks/archiso_pxe_common | 1 + 1 file changed, 1 insertion(+) (limited to 'hooks') diff --git a/hooks/archiso_pxe_common b/hooks/archiso_pxe_common index 2e567ec..a47b6c0 100644 --- a/hooks/archiso_pxe_common +++ b/hooks/archiso_pxe_common @@ -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 -- cgit v1.2.3-70-g09d2