summaryrefslogtreecommitdiff
path: root/debvm-create
diff options
context:
space:
mode:
Diffstat (limited to 'debvm-create')
-rwxr-xr-xdebvm-create21
1 files changed, 21 insertions, 0 deletions
diff --git a/debvm-create b/debvm-create
index c44b67d..e907962 100755
--- a/debvm-create
+++ b/debvm-create
@@ -112,6 +112,27 @@ if test -n "$SSHKEY"; then
INCLUDE_PACKAGES="$INCLUDE_PACKAGES,openssh-server"
fi
+# add a DNS resolver
+case "$SUITE" in
+ jessie)
+ set -- '--customize-hook=chroot "$1" systemctl enable systemd-resolved.service' "$@"
+ set -- '--customize-hook=ln -fs ../run/systemd/resolve/resolv.conf "$1/etc/resolv.conf"' "$@"
+ ;;
+ stretch)
+ set -- '--customize-hook=chroot "$1" systemctl enable systemd-resolved.service' "$@"
+ set -- '--customize-hook=ln -fs ../run/systemd/resolve/resolv.conf "$1/etc/resolv.conf"' "$@"
+ INCLUDE_PACKAGES="$INCLUDE_PACKAGES,libnss-resolve"
+ ;;
+ buster|bullseye|stable)
+ set -- '--customize-hook=chroot "$1" systemctl enable systemd-resolved.service' "$@"
+ set -- '--customize-hook=ln -fs ../run/systemd/resolve/stub-resolv.conf "$1/etc/resolv.conf"' "$@"
+ INCLUDE_PACKAGES="$INCLUDE_PACKAGES,libnss-resolve"
+ ;;
+ *)
+ INCLUDE_PACKAGES="$INCLUDE_PACKAGES,libnss-resolve"
+ ;;
+esac
+
# construct mmdebstrap options as $@:
set -- \
--verbose \