summaryrefslogtreecommitdiff
path: root/debvm-run
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2022-12-22 22:04:03 +0100
committerHelmut Grohne <helmut@subdivi.de>2022-12-22 22:04:03 +0100
commit444b51356c20471c891dd41c7b08b6fb4d475cb3 (patch)
tree7ffad6e348862267492fe03dedacdd023030658e /debvm-run
parent4e10d0b4df0118c048c815d30191da702776735e (diff)
downloaddebvm-444b51356c20471c891dd41c7b08b6fb4d475cb3.tar.gz
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 <git@jochen.sprickerhof.de>
Diffstat (limited to 'debvm-run')
-rwxr-xr-xdebvm-run4
1 files changed, 4 insertions, 0 deletions
diff --git a/debvm-run b/debvm-run
index 9b26a76..ffae61c 100755
--- a/debvm-run
+++ b/debvm-run
@@ -144,6 +144,10 @@ fi
if test -n "$SSHPORT"; then
NETDEV="$NETDEV,hostfwd=tcp:127.0.0.1:$SSHPORT-:22"
fi
+DNSSEARCH=$(dnsdomainname)
+if test -n "$DNSSEARCH"; then
+ NETDEV="$NETDEV,dnssearch=$DNSSEARCH"
+fi
set -- \
-append "$KERNEL_CMDLINE" \
-netdev "$NETDEV" \