From 444b51356c20471c891dd41c7b08b6fb4d475cb3 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 22 Dec 2022 22:04:03 +0100 Subject: fix local dns search Previously, the /etc/resolv.conf was inherited from the host. It would thus also inherit the search domains. Now, the generated image lacks the host's resolv.conf and thus it search domains. This is good for reproducibility. In order to continue resolving plain host names, we tell qemu to serve the search domain via dhcp and we tell networkd to trust the dhcp server's domains. Signed-off-by: Jochen Sprickerhof --- debvm-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debvm-create') diff --git a/debvm-create b/debvm-create index e907962..5bcd55d 100755 --- a/debvm-create +++ b/debvm-create @@ -157,7 +157,7 @@ set -- '--customize-hook=chroot "$1" passwd --delete root' "$@" # dhcp on all network interfaces set -- \ '--customize-hook=chroot "$1" systemctl enable systemd-networkd.service' \ - "--customize-hook=printf '"'[Match]\nName=en*\nName=eth*\n[Network]\nDHCP=yes\n'"'"' > "$1/etc/systemd/network/20-wired.network"' \ + "--customize-hook=printf '"'[Match]\nName=en*\nName=eth*\n[Network]\nDHCP=yes\n[DHCPv4]\nUseDomains=yes\n'"'"' > "$1/etc/systemd/network/20-wired.network"' \ "$@" # add ssh key for root -- cgit v1.2.3