From: Zbigniew Jędrzejewski-Szmek Date: Wed, 20 Apr 2016 04:03:47 +0000 (-0400) Subject: man: try to explain different actions in tmpfiles a bit better X-Git-Tag: v231~428^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b743d679bfa8a39760f936344392001e8768e21;p=platform%2Fupstream%2Fsystemd.git man: try to explain different actions in tmpfiles a bit better - do not suggest that vendor configuration files should be in /etc, use /usr/lib/tmpfiles.d instead - split the first example, because the text talked about "needing two directories", but then a smack attribute was also set, and on a different path, which looked like a typo. Replace that with the example from original patch [1] which added 't'. - fix the example for /var/tmp/abrt. The 'x' line was redundant, because /var/tmp/abrt/* is already filtered because "d /var/tmp/abrt" overrides "d /var/tmp". [1] http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/25051 --- diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 3b6b1e3..cd6d7f6 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -157,13 +157,17 @@ d - Create a directory if it does not exist yet. - + Create a directory. The mode and ownership will be adjusted if + specified and the directory already exists. Contents of this directory are subject + to time based cleanup if the time argument is specified. D - Create or empty a directory. + Similar to d, but in addition the contents + of the directory will be removed when is used. + + @@ -612,22 +616,49 @@ - Example + Examples - /etc/tmpfiles.d/screen.conf example - screen needs two directories created at - boot with specific modes and ownership. + Create directories with specific mode and ownership + + screen1, + needs two directories created at boot with specific modes and ownership: + + # /usr/lib/tmpfiles.d/screen.conf +d /run/screens 1777 root screen 10d +d /run/uscreens 0755 root screen 10d12h + + + Contents of /run/screens and /run/uscreens will + cleaned up after 10 and 10½ days, respectively. + - d /run/screens 1777 root root 10d -d /run/uscreens 0755 root root 10d12h -t /run/screen - - - - user.name="John Smith" security.SMACK64=screen + + Create a directory with a SMACK attribute + D /run/cups - - - - +t /run/cups - - - - security.SMACK64=printing user.attr-with-spaces="foo bar" + + + The direcory will be owned by root and have default mode. It's contents are + not subject to time based cleanup, but will be obliterated when + systemd-tmpfiles --remove runs. + - /etc/tmpfiles.d/abrt.conf example - abrt needs a directory created at boot with specific mode and ownership and its content should be preserved. + Create a directory and prevent its contents from cleanup + + abrt1, + needs a directory created at boot with specific mode and ownership and its content + should be preserved from the automatic cleanup applied to the contents of + /var/tmp: + + # /usr/lib/tmpfiles.d/tmp.conf +d /var/tmp 1777 root root 30d + + + # /usr/lib/tmpfiles.d/abrt.conf +d /var/tmp/abrt 0755 abrt abrt - + - d /var/tmp/abrt 0755 abrt abrt -x /var/tmp/abrt/*