Commit Graph

16 Commits

Author SHA1 Message Date
William Hubbs
09733d3fae tmpfiles.sh: small fixes
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-12-10 22:34:40 -06:00
Dirk Sondermann
e90dcf39dd tmpfiles: do not signal an error if device nodes already exist
X-Gentoo-Bug: 478336
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336
2013-07-27 10:53:32 -05:00
William Hubbs
e9189cd8a2 tmpfiles: add --prefix and --exclude-prefix options 2013-07-25 00:58:38 -05:00
William Hubbs
19579687fd tmpfiles: make b and c commands set ownership and permissions
The b and c commands in tmpfiles.sh were not setting ownership and
permissions for the device nodes.
2013-07-23 17:58:42 -05:00
Hank Leininger
3af434a4e9 typo fix
X-Gentoo-Bug: 477006
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477006
2013-07-16 17:12:45 -05:00
William Hubbs
274d6eee66 tmpfiles: add support for the new X line type
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
2013-03-11 01:03:06 -05:00
William Hubbs
ec60e20331 tmpfiles: fix bashism
reported-by: <pesa@gentoo.org>
2012-11-06 16:32:59 -06:00
Robin H. Johnson
4936b72e0f tmpfilesd: Doing both create+remove at the same time is valid.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-05 21:25:32 +00:00
Andrew Gregory
525c731f0e tmpfilesd: parse arguments with spaces
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-21 19:50:54 -05:00
Andrew Gregory
5647946e61 tmpfiles: return success from _f/_F on empty $arg
'[ -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-21 19:49:42 -05:00
William Hubbs
74c6b554bc tmpfiles: do not process systemd.conf
This file contains definitions specific to systemd, so we should not
process it.

Reported-by: <andrew.gregory.8@gmail.com>
2012-10-21 14:50:29 -05:00
Robin H. Johnson
4ff71bd741 tmpfiles.d init.d scripts
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-26 15:42:37 -07:00
Robin H. Johnson
5c736ad63e sh/tmpfiles.sh: Improve dry-run mode.
Dry-run with more detail is more useful this way.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-09-26 15:14:04 -07:00
Robin H. Johnson
c8703354e3 sh/tmpfiles: fix quoting for optional arguments
Some optional arguments were missing quotes in the tests, so produced
spurious warnings.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-08-16 18:45:23 +00:00
Robin H. Johnson
65be94a34a sh/tmpfiles: Upstream clarifications & quoting fixes.
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-12 12:04:30 -07:00
Robin H. Johnson
c75352af3d sh/tmpfiles: tmpfiles.d support.
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>
2012-03-12 01:37:31 -07:00