summaryrefslogtreecommitdiff
path: root/init.d
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
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')
-rw-r--r--init.d/.gitignore2
-rw-r--r--init.d/Makefile1
-rw-r--r--init.d/tmpfilesd.boot.in18
-rw-r--r--init.d/tmpfilesd.sysinit.in20
4 files changed, 41 insertions, 0 deletions
diff --git a/init.d/.gitignore b/init.d/.gitignore
index f9df045..515348b 100644
--- a/init.d/.gitignore
+++ b/init.d/.gitignore
@@ -41,3 +41,5 @@ syslogd
termencoding
ttys
wscons
+tmpfilesd.boot
+tmpfilesd.sysinit
diff --git a/init.d/Makefile b/init.d/Makefile
index d192749..54e5fd5 100644
--- a/init.d/Makefile
+++ b/init.d/Makefile
@@ -1,6 +1,7 @@
DIR= ${INITDIR}
SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \
root.in savecache.in swap.in swapfiles.in \
+ tmpfilesd.boot.in tmpfilesd.sysinit.in \
swclock.in sysctl.in urandom.in ${SRCS-${OS}}
BIN= ${OBJS}
diff --git a/init.d/tmpfilesd.boot.in b/init.d/tmpfilesd.boot.in
new file mode 100644
index 0000000..838bdd8
--- /dev/null
+++ b/init.d/tmpfilesd.boot.in
@@ -0,0 +1,18 @@
+#!@PREFIX@/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 2-clause BSD license.
+
+description="Create tmpfiles.d entries (boot)"
+
+depend()
+{
+ need localmount
+}
+
+start()
+{
+ ebegin "${description/Create/Creating}"
+ @LIBEXECDIR@/sh/tmpfiles.sh --create ${tmpfiles_opts}
+ eend $?
+ return 0
+}
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
+}