summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore1
-rw-r--r--units/kmod-static-nodes.service.in16
-rw-r--r--units/systemd-tmpfiles-setup-dev.service.in2
-rw-r--r--units/systemd-udevd.service.in4
4 files changed, 20 insertions, 3 deletions
diff --git a/units/.gitignore b/units/.gitignore
index 0bcbb00951..9aee00f2a4 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -58,3 +58,4 @@
/initrd-udevadm-cleanup-db.service
/systemd-nspawn@.service
/systemd-machined.service
+/kmod-static-nodes.service
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
new file mode 100644
index 0000000000..f8a2d474ef
--- /dev/null
+++ b/units/kmod-static-nodes.service.in
@@ -0,0 +1,16 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Create list of required static device nodes for the current kernel
+DefaultDependencies=no
+Before=sysinit.target systemd-tmpfiles-setup-dev.service
+
+[Service]
+Type=oneshot
+ExecStartPre=/usr/bin/mkdir -p /run/tmpfiles.d
+ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
index f029285bc0..8073b1229d 100644
--- a/units/systemd-tmpfiles-setup-dev.service.in
+++ b/units/systemd-tmpfiles-setup-dev.service.in
@@ -9,7 +9,7 @@
Description=Create static device nodes in /dev
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
DefaultDependencies=no
-Before=sysinit.target systemd-udevd.service
+Before=sysinit.target local-fs-pre.target systemd-udevd.service
ConditionCapability=CAP_MKNOD
[Service]
diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
index ddef423625..99f51304e4 100644
--- a/units/systemd-udevd.service.in
+++ b/units/systemd-udevd.service.in
@@ -11,8 +11,8 @@ Documentation=man:systemd-udevd.service(8) man:udev(7)
DefaultDependencies=no
Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
After=systemd-udevd-control.socket systemd-udevd-kernel.socket
-Before=sysinit.target local-fs-pre.target
-ConditionCapability=CAP_MKNOD
+Before=sysinit.target
+ConditionPathIsReadWrite=/sys
[Service]
Type=notify