summaryrefslogtreecommitdiff
path: root/init.d/tmpfilesd.sysinit.in
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-09-26 15:42:37 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2012-09-26 15:42:37 -0700
commit4ff71bd7416b84712ec702c92d79c106b4f11eb1 (patch)
treedb705394bae47d93ef1b37bad02cc36f001a1132 /init.d/tmpfilesd.sysinit.in
parent5c736ad63e65949f7488474cc08cf3c8f2e7b0f9 (diff)
downloadopenrc-4ff71bd7416b84712ec702c92d79c106b4f11eb1.tar.gz
openrc-4ff71bd7416b84712ec702c92d79c106b4f11eb1.tar.bz2
openrc-4ff71bd7416b84712ec702c92d79c106b4f11eb1.tar.xz
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>
Diffstat (limited to 'init.d/tmpfilesd.sysinit.in')
-rw-r--r--init.d/tmpfilesd.sysinit.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/init.d/tmpfilesd.sysinit.in b/init.d/tmpfilesd.sysinit.in
new file mode 100644
index 0000000..9a0dbe4
--- /dev/null
+++ b/init.d/tmpfilesd.sysinit.in
@@ -0,0 +1,20 @@
+#!@PREFIX@/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 2-clause BSD license.
+
+description="Create tmpfiles.d entries (sysinit)"
+
+depend()
+{
+ # Convert to 'need dev' when the new udev is ready, for OpenRC 0.11
+ #need dev-mount
+ need dev
+}
+
+start()
+{
+ ebegin "${description/Create/Creating}"
+ @LIBEXECDIR@/sh/tmpfiles.sh --create ${tmpfiles_opts}
+ eend $?
+ return 0
+}