]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: exclude x11 lock files from time-based cleanup 42358/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Sun, 31 May 2026 09:39:07 +0000 (11:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Sun, 31 May 2026 09:44:38 +0000 (11:44 +0200)
We need a removal rule for systems where /tmp is not on tmpfs,
so that if they crash, stale sockets will be removed during boot.
OTOH, at runtime, those lock files must never be removed.
But since the 'r!' rule uses '!', it only applies during boot. With
the rule inactive, the usual time-based cleanup for /tmp/ was also
applied to those files, causing them to be removed after 10 days.

Fixes #35182.

tmpfiles.d/x11.conf

index b45c8eec25093892dc480a7058fce344033cea83..e83229590a40f7ac9f86af04d48d3f59635401da 100644 (file)
@@ -14,5 +14,6 @@ D /tmp/.ICE-unix 1777 root root 1h
 D /tmp/.XIM-unix 1777 root root 1h
 D /tmp/.font-unix 1777 root root 1h
 
-# Unlink the X11 lock files
+# Unlink the X11 lock files at boot, but exclude them from time-based cleanup later
 r! /tmp/.X[0-9]*-lock
+x /tmp/.X[0-9]*-lock