chiark / gitweb /
tmpfiles: Move /tmp and /var/tmp to a separate tmpfiles.d file to ease overrides...
authorJosh Triplett <josh@joshtriplett.org>
Sat, 6 Aug 2011 22:48:27 +0000 (15:48 -0700)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Aug 2011 18:39:33 +0000 (20:39 +0200)
Many people prefer to avoid clearing /tmp and /var/tmp, and
distributions often have explicit settings for how often to clear them
if at all.  Overriding those with systemd currently requires overriding
all of /usr/lib/tmpfiles.d/systemd.conf via
/etc/tmpfiles.d/systemd.conf, copying across all the other entries, and
updating that override when systemd.conf changes.

Move the /tmp and /var/tmp entries from systemd.conf to a separate
tmp.conf, making them easier to override without affecting the rest of
systemd.conf.

Makefile.am
tmpfiles.d/systemd.conf
tmpfiles.d/tmp.conf [new file with mode: 0644]

index ef3bd846c6a99e87c0829097c1c112d85ae81c43..c1a4a5f1b01a088af4e286b69497d2d75766a6ff 100644 (file)
@@ -301,6 +301,7 @@ dist_bashcompletion_DATA = \
 
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
+       tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf
 
 if HAVE_SYSV_COMPAT
index 7d4b356a1234fab54eafe941ce1cc87196355db6..be29c068af10d161ac298c5164112f7e5b279ebc 100644 (file)
@@ -13,9 +13,6 @@ F /run/utmp 0664 root utmp -
 f /var/log/wtmp 0664 root utmp -
 f /var/log/btmp 0600 root utmp -
 
-d /tmp 1777 root root 10d
-d /var/tmp 1777 root root 30d
-
 d /var/cache/man - - - 30d
 
 r /forcefsck
diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
new file mode 100644 (file)
index 0000000..8915b82
--- /dev/null
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+# Clear tmp directories separately, to make them easier to override
+d /tmp 1777 root root 10d
+d /var/tmp 1777 root root 30d