summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-07-25 12:33:03 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-07-25 13:53:44 -0500
commit35f2f1ec73aa6754764d573ea3e1cce938b3ee9a (patch)
treeba3884ebd71255085b86a2514d7e29de509b4c28
parente9189cd8a24b5614f3e82aec4a779e4d90656b1e (diff)
downloadopenrc-35f2f1ec73aa6754764d573ea3e1cce938b3ee9a.tar.gz
openrc-35f2f1ec73aa6754764d573ea3e1cce938b3ee9a.tar.bz2
openrc-35f2f1ec73aa6754764d573ea3e1cce938b3ee9a.tar.xz
Introduce the tmpfiles.dev service
This service handles setting up the tmpfiles entries for the /dev directory for Linux systems which needs to be run in the sysinit runlevel.
-rw-r--r--init.d/Makefile2
-rw-r--r--init.d/tmpfiles.dev.in21
-rw-r--r--init.d/tmpfiles.setup.in3
-rw-r--r--runlevels/Makefile2
4 files changed, 25 insertions, 3 deletions
diff --git a/init.d/Makefile b/init.d/Makefile
index e7e2d86..fc55b3e 100644
--- a/init.d/Makefile
+++ b/init.d/Makefile
@@ -28,7 +28,7 @@ SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in encswap.in ipfw.in \
NET_LO-Linux= net.lo
SRCS-Linux= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
killprocs.in modules.in mount-ro.in mtab.in numlock.in \
- procfs.in sysfs.in termencoding.in
+ procfs.in sysfs.in termencoding.in tmpfiles.dev.in
NET_LO-NetBSD= net.lo0
# Generic BSD scripts
diff --git a/init.d/tmpfiles.dev.in b/init.d/tmpfiles.dev.in
new file mode 100644
index 0000000..477fafa
--- /dev/null
+++ b/init.d/tmpfiles.dev.in
@@ -0,0 +1,21 @@
+#!@SBINDIR@/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 2-clause BSD license.
+
+description="set up tmpfiles.d entries"
+
+depend()
+{
+ use dev-mount
+ before dev
+ keyword -prefix -vserver
+}
+
+start()
+{
+ ebegin "setting up tmpfiles.d entries for /dev"
+ @LIBEXECDIR@/sh/tmpfiles.sh --prefix=/dev --create --remove \
+ ${tmpfiles_opts}
+ eend $?
+ return 0
+}
diff --git a/init.d/tmpfiles.setup.in b/init.d/tmpfiles.setup.in
index 81bc369..fd9b015 100644
--- a/init.d/tmpfiles.setup.in
+++ b/init.d/tmpfiles.setup.in
@@ -12,7 +12,8 @@ depend()
start()
{
ebegin "setting up tmpfiles.d entries"
- @LIBEXECDIR@/sh/tmpfiles.sh --create --remove ${tmpfiles_opts}
+ @LIBEXECDIR@/sh/tmpfiles.sh --exclude-prefix=/dev --create --remove \
+ ${tmpfiles_opts}
eend $?
return 0
}
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 6eb84ca..f691113 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -40,7 +40,7 @@ BOOT-FreeBSD+= adjkerntz dumpon syscons
BOOT-Linux+= hwclock keymaps modules mtab procfs termencoding tmpfiles.setup
SHUTDOWN-Linux= killprocs mount-ro
-SYSINIT-Linux= devfs dmesg sysfs
+SYSINIT-Linux= devfs dmesg sysfs tmpfiles.dev
# Generic BSD stuff
BOOT-NetBSD+= hostid newsyslog savecore syslogd