From: Daan De Meyer Date: Mon, 11 Mar 2024 18:53:46 +0000 (+0100) Subject: Only mount /etc/resolv.conf if it actually exists X-Git-Tag: v22~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f86a739f4ef5b149583140ebfe9f0c262e5324f8;p=thirdparty%2Fmkosi.git Only mount /etc/resolv.conf if it actually exists --- diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py index c6098f490..2cfedb32f 100644 --- a/mkosi/sandbox.py +++ b/mkosi/sandbox.py @@ -171,7 +171,7 @@ def sandbox_cmd( if scripts: cmdline += ["--ro-bind", scripts, "/scripts"] - if network and not relaxed: + if network and not relaxed and Path("/etc/resolv.conf").exists(): cmdline += ["--bind", "/etc/resolv.conf", "/etc/resolv.conf"] # bubblewrap creates everything with a restricted mode so relax stuff as needed.