summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/debvm-run3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/debvm-run b/bin/debvm-run
index f189086..588a153 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -501,6 +501,9 @@ else
fi
DNSSEARCH=$(dnsdomainname)
+if test -z "$DNSSEARCH"; then
+ DNSSEARCH=$(sed -n 's/^\s*search\s*\.\?//p;T;q' /etc/resolv.conf)
+fi
if test -n "$DNSSEARCH"; then
NETOPTS=",domainname=$DNSSEARCH$NETOPTS"
fi