diff --git a/python/scripts/sd_nspawn.py b/python/scripts/sd_nspawn.py index 3d96582e..e2e8a4ab 100755 --- a/python/scripts/sd_nspawn.py +++ b/python/scripts/sd_nspawn.py @@ -104,6 +104,10 @@ def _add_dynamic_mounts(self, name): self.data['Files']['Bind'].append(item) for mount in ro_mounts: + # If it is a temporary directory that does not exist already, just + # created it so that the next check passes. + if mount.startswith('/var/tmp'): + Path(mount).mkdir(exist_ok=True) if Path(mount).exists(): self.data['Files']['BindReadOnly'].append(mount)