From b0ddd4947f9619cf1ac6637ae8967bc5bb26be46 Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Mon, 13 Oct 2025 15:55:47 +0900 Subject: [PATCH] flatcar-postinst: Use lazy unmount for /etc in temporary namespace There is a post-install action to prevent opaque directories (meaning any existing underlay directory is ignored) for those directories under /etc that the user might have created but we ship them later also in our /etc underlay. This action was not working when files were kept open under /etc because the unmount in the temporary namespace was not lazy. Use the lazy unmount option to address this. Signed-off-by: Kai Lueke --- flatcar-postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatcar-postinst b/flatcar-postinst index 684283d..6dcfb3e 100644 --- a/flatcar-postinst +++ b/flatcar-postinst @@ -248,7 +248,7 @@ done # To fix this, remove any opaque markers for this directory. Other common folders which # we introduce later in the lowerdir could also be handled that way, e.g., /etc/cni/. if mountpoint -q /etc; then - unshare -m sh -c "umount /etc && mkdir -p /etc/extensions && attr -R -r overlay.opaque /etc/extensions || true" + unshare -m sh -c "umount -l /etc && mkdir -p /etc/extensions && attr -R -r overlay.opaque /etc/extensions || true" fi # Systemd version >= 256 does not boot anymore if cgroupv1 is enabled or SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1 is set