aboutsummaryrefslogtreecommitdiff
path: root/sh/tmpfiles.sh.in
AgeCommit message (Collapse)Author
2015-04-08Fix tmpfiles processingWilliam Hubbs
Tmpfiles.d processing had /run overriding /usr/lib and /etc, but this is not correct. The correct order, from lowest to highest, for tmpfiles processing is: * /usr/lib/tmpfiles.d/*.conf * /run/tmpfiles.d/*.conf * /etc/tmpfiles.d This means /run/tmpfiles.d/*.conf can override /etc/tmpfiles.d/*.conf, but /etc/tmpfiles.d/*.conf can override both of them. This fixes #49.
2014-08-27tmpfiles.sh: add support for C actionAndrew Gregory
Recursively copies files or directories. Added by systemd in 849958d1.
2014-08-27tmpfiles.sh: add support for + modifierAndrew Gregory
systemd added support for b+, c+, p+, and L+ in 2e78fa79 and 1554afae to remove the target path if it already exists.
2014-08-13tmpfiles: fix relabel to run restorecon before chown and chmodWilliam Hubbs
2014-08-13tmpfiles: Move relabelling before any other calls for device nodesJason Zaman
Device nodes are normally never device_t so this type does not have many permissions. After the mknod, the device should have its label corrected before any other operations (like chmod).
2014-08-07tmpfiles.sh: do not use installJason Zaman
install is in /usr which causes problems if /usr is not mounted. Instead, checkpath and "mkdir -p" can do everything required and are both available before /usr is mounted. Since checkpath also handles selinux labels correctly, _restorecon after is not required. X-Gentoo-Bug: 503408 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503408
2014-07-16tmpfiles: set the proper SELinux contextJason Zaman
Restore the label on the created file / dir based on the policy fcontexts. X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-06-20tmpfiles.sh: fix comment processingWilliam Hubbs
If you happened to format a comment with no white space after the '#', it was not being processed. Reported-by: consus@gmx.com X-Gentoo-Bug: 511804 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511804
2014-06-20sh/tmpfiles.sh: license under 2-clause BSDRobin H. Johnson
As the author of our tmpfiles.sh script, I hereby license it under 2-clause BSD, like the rest of openrc. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2014-03-27tmpfiles: add support for --boot optionAndrew Gregory
For compatibility with systemd-tmpfiles. Fixes #17 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-03-27tmpfiles: ignore all files starting with systemd-Andrew Gregory
systemd recently moved creation of /run/nologin to systemd-nologin.conf Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-12-10tmpfiles.sh: small fixesWilliam Hubbs
Change "sort | uniq" to "sort -u". Also, change `...` to $(...). X-Gentoo-Bug: 493736 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493736
2013-07-27tmpfiles: do not signal an error if device nodes already existDirk Sondermann
X-Gentoo-Bug: 478336 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336
2013-07-25tmpfiles: add --prefix and --exclude-prefix optionsWilliam Hubbs
2013-07-23tmpfiles: make b and c commands set ownership and permissionsWilliam Hubbs
The b and c commands in tmpfiles.sh were not setting ownership and permissions for the device nodes.
2013-07-16typo fixHank Leininger
X-Gentoo-Bug: 477006 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477006
2013-03-11tmpfiles: add support for the new X line typeWilliam Hubbs
tmpfiles now has a new line type, X, which is similar to the x line type used by the cleanup function. This is not supported yet by OpenRc, because we do not have the cleanup function in tmpfiles.sh, so I have added a dummy procedure for it so we don't get complaints about this line type. Reported-by: mgorny@gentoo.org X-Gentoo-Bug: 460880 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=460880
2012-11-06tmpfiles: fix bashismWilliam Hubbs
reported-by: <pesa@gentoo.org>
2012-11-05tmpfilesd: Doing both create+remove at the same time is valid.Robin H. Johnson
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-10-21tmpfilesd: parse arguments with spacesAndrew Gregory
systemd allows the final arg in tmpfiles to contain spaces. Using the read() call to set the variables includes all trailing components in $arg so it doesn't get cut off. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-21tmpfiles: return success from _f/_F on empty $argAndrew Gregory
'[ -n "$arg" ] && _w' causes _f/_F to return the failure from the test when $arg is empty. Inverting the test causes the test and _f/_F to return success. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-10-21tmpfiles: do not process systemd.confWilliam Hubbs
This file contains definitions specific to systemd, so we should not process it. Reported-by: <andrew.gregory.8@gmail.com>
2012-09-26tmpfiles.d init.d scriptsRobin H. Johnson
Now that the tmpfiles.d code is more tested, actually call it from init.d. It assumes that /run is already available when it runs. Please note it runs TWICE. - During sysinit, ideally just after /dev/shm is created, but before udev has started. After udev is also acceptable, but not ideal. - During boot, ideally just after localmount has completed. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-09-26sh/tmpfiles.sh: Improve dry-run mode.Robin H. Johnson
Dry-run with more detail is more useful this way. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-08-16sh/tmpfiles: fix quoting for optional argumentsRobin H. Johnson
Some optional arguments were missing quotes in the tests, so produced spurious warnings. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-12sh/tmpfiles: Upstream clarifications & quoting fixes.Robin H. Johnson
Upstream has clarified via IRC: - hardcoding /usr/lib/ is an explicit choice. It should NOT consider $libdir at all. - The z/Z relabel types should call restorecon, not chcon. - Whitespace is not allowed in tmpfiles.d/*.conf path entries, but is allowed in globs results. Fixed quoting of path arguments for this. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-12sh/tmpfiles: tmpfiles.d support.Robin H. Johnson
This is the baseline support for tmpfiles.d. Still missing: - SELinux relabel, pending upstream clarification - LIBDIR vs multilib systems, pending upstream clarification - Whitespace in paths? - Clean support not implemented - "x" exclude type not implemented X-Gentoo-Bug: 396003 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396003 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>