Age | Commit message (Collapse) | Author |
|
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.
|
|
Recursively copies files or directories. Added by systemd in 849958d1.
|
|
systemd added support for b+, c+, p+, and L+ in 2e78fa79 and 1554afae to
remove the target path if it already exists.
|
|
|
|
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).
|
|
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
|
|
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
|
|
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
|
|
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>
|
|
For compatibility with systemd-tmpfiles.
Fixes #17
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
systemd recently moved creation of /run/nologin to systemd-nologin.conf
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
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
|
|
X-Gentoo-Bug: 478336
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336
|
|
|
|
The b and c commands in tmpfiles.sh were not setting ownership and
permissions for the device nodes.
|
|
X-Gentoo-Bug: 477006
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477006
|
|
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
|
|
reported-by: <pesa@gentoo.org>
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
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>
|
|
'[ -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>
|
|
This file contains definitions specific to systemd, so we should not
process it.
Reported-by: <andrew.gregory.8@gmail.com>
|
|
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>
|
|
Dry-run with more detail is more useful this way.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Some optional arguments were missing quotes in the tests, so produced
spurious warnings.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
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>
|
|
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>
|