From: Luca Boccassi Date: Fri, 18 Jun 2021 17:28:08 +0000 (+0100) Subject: debian: enable resolved and symlink /etc/resolv.conf X-Git-Tag: v10~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F746%2Fhead;p=thirdparty%2Fmkosi.git debian: enable resolved and symlink /etc/resolv.conf By default resolved is disabled, and /etc/resolv.conf is an actual file with 'nameserver 127.0.0.1'. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 48099171d..67910a3c3 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2348,6 +2348,12 @@ def install_debian_or_ubuntu(args: CommandLineArguments, root: str, *, do_run_bu # Debian still has pam_securetty module enabled disable_pam_securetty(root) + if args.distribution == Distribution.debian: + # The default resolv.conf points to 127.0.0.1, and resolved is disabled + os.unlink(os.path.join(root, "etc/resolv.conf")) + os.symlink("../run/systemd/resolve/resolv.conf", os.path.join(root, "etc/resolv.conf")) + run(["systemctl", "--root", root, "enable", "systemd-resolved"]) + @complete_step("Installing Debian") def install_debian(args: CommandLineArguments, root: str, do_run_build_script: bool) -> None: