summaryrefslogtreecommitdiff
path: root/init.d/tmpfiles.setup.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2012-10-31 10:53:37 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-10-31 17:33:14 -0500
commit1a8cd5ff9ded16dd071624fa056712678b2cda6a (patch)
tree091a881aa2b99fa59a39299a8cd1668b1aef2640 /init.d/tmpfiles.setup.in
parenteff07c48b7a2266a4c82a202960856b4f39936d0 (diff)
downloadopenrc-1a8cd5ff9ded16dd071624fa056712678b2cda6a.tar.gz
openrc-1a8cd5ff9ded16dd071624fa056712678b2cda6a.tar.bz2
openrc-1a8cd5ff9ded16dd071624fa056712678b2cda6a.tar.xz
Tmpfiles: create and delete entries once in the boot runlevel.
Initially, we were creating tmpfiles entries in the sysinit runlevel and again in the boot runlevel. Systemd runs the --create and --remove options in one service called systemd-tmpfiles-setup after the local file systems are mounted. Now we have a service called tmpfiles.setup which emulates this. This also closes the bug mentioned below, since we were originally writing to files that were on read-only file systems and that were not available. Reported-by: <devurandom@gmx.net> X-Gentoo-Bug: 439012 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439012
Diffstat (limited to 'init.d/tmpfiles.setup.in')
-rw-r--r--init.d/tmpfiles.setup.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/init.d/tmpfiles.setup.in b/init.d/tmpfiles.setup.in
new file mode 100644
index 0000000..a3ecd31
--- /dev/null
+++ b/init.d/tmpfiles.setup.in
@@ -0,0 +1,18 @@
+#!@PREFIX@/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 2-clause BSD license.
+
+description="set up tmpfiles.d entries"
+
+depend()
+{
+ need localmount
+}
+
+start()
+{
+ ebegin "setting up tmpfiles.d entries"
+ @LIBEXECDIR@/sh/tmpfiles.sh --create --remove ${tmpfiles_opts}
+ eend $?
+ return 0
+}