From: Malte Poll Date: Mon, 14 Aug 2023 18:03:14 +0000 (+0200) Subject: skip passwd bind mounts if the path does not exist on the host X-Git-Tag: v16~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca9673cbcbd9f293e5566cec4a1ba14bbcd075b8;p=thirdparty%2Fmkosi.git skip passwd bind mounts if the path does not exist on the host --- diff --git a/mkosi/run.py b/mkosi/run.py index e1ed6ca84..96290b5ae 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -344,6 +344,8 @@ def finalize_passwd_mounts(root: Path) -> list[PathString]: options: list[PathString] = [] for f in ("passwd", "group", "shadow", "gshadow"): + if not (Path("etc") / f).exists(): + continue p = root / "etc" / f if p.exists(): options += ["--bind", p, f"/etc/{f}"]