aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.d/Makefile2
-rw-r--r--conf.d/tmpfilesd3
-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
-rw-r--r--runlevels/Makefile4
-rwxr-xr-xsh/tmpfiles.sh.in2
8 files changed, 48 insertions, 4 deletions
diff --git a/conf.d/Makefile b/conf.d/Makefile
index 6ed295d5..0e610218 100644
--- a/conf.d/Makefile
+++ b/conf.d/Makefile
@@ -1,5 +1,5 @@
DIR= ${CONFDIR}
-CONF= bootmisc fsck hostname localmount urandom ${CONF-${OS}}
+CONF= bootmisc fsck hostname localmount urandom tmpfilesd ${CONF-${OS}}
ifeq (${MKNET},)
CONF+= network staticroute
diff --git a/conf.d/tmpfilesd b/conf.d/tmpfilesd
new file mode 100644
index 00000000..c3f208fe
--- /dev/null
+++ b/conf.d/tmpfilesd
@@ -0,0 +1,3 @@
+# Extra options for tmpfiles.sh
+#tmpfiles_opts="--verbose"
+tmpfiles_opts=""
diff --git a/init.d/.gitignore b/init.d/.gitignore
index f9df045a..515348bb 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 d192749e..54e5fd55 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 00000000..838bdd86
--- /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 00000000..9a0dbe47
--- /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
+}
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 0f134c89..e78e2d19 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -38,9 +38,9 @@ BOOT-FreeBSD+= hostid newsyslog savecore syslogd
# FreeBSD specific stuff
BOOT-FreeBSD+= adjkerntz dumpon syscons
-BOOT-Linux+= hwclock keymaps modules mtab procfs termencoding
+BOOT-Linux+= hwclock keymaps modules mtab procfs termencoding tmpfilesd.boot
SHUTDOWN-Linux= killprocs mount-ro
-SYSINIT-Linux= devfs dmesg sysfs
+SYSINIT-Linux= devfs dmesg sysfs tmpfilesd.sysinit
# Generic BSD stuff
BOOT-NetBSD+= hostid newsyslog savecore syslogd
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 64f93de0..a341845c 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -266,7 +266,7 @@ for FILE in $tmpfiles_d ; do
# whine about invalid entries
case $1 in
f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;;
- \#) continue ;;
+ \#) continue ;;
*) warninvalid ; continue ;;
esac