[systemd-commits] Makefile.am units/systemd-static-nodes.service.in

Tom Gundersen tomegun at kemper.freedesktop.org
Thu Apr 11 17:53:49 PDT 2013


 Makefile.am                           |    5 +++++
 units/systemd-static-nodes.service.in |   16 ++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 8c11aac1d739f5e60822f65f5179d8c4cc212732
Author: Tom Gundersen <teg at jklm.no>
Date:   Thu Apr 11 21:14:40 2013 +0200

    tmpfiles: create static device nodes before udev is started
    
    Since v183, the contents of /usr/lib/udev/devices is no longer copied to /dev
    on boot, rather systemd-tmpfiles should be used instead. However, as
    systemd-tmpfiles --create is only ran long after udevd has been started, it is
    no longer possible to use udev rules to assign permissions to the static nodes.
    
    This calls systemd-tmpfiles --create early, before udev is started, and
    restricts the call to /dev, which is known to be mounted already.
    
    In the future, this could also take over the creation of static device nodes
    from systemd-udevd.

diff --git a/Makefile.am b/Makefile.am
index 117bbf3..eee73e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -427,6 +427,7 @@ nodist_systemunit_DATA = \
 	units/systemd-kexec.service \
 	units/systemd-fsck at .service \
 	units/systemd-fsck-root.service \
+	units/systemd-static-nodes.service \
 	units/systemd-udevd.service \
 	units/systemd-udev-trigger.service \
 	units/systemd-udev-settle.service \
@@ -468,6 +469,7 @@ EXTRA_DIST += \
 	units/systemd-fsck at .service.in \
 	units/systemd-fsck-root.service.in \
 	units/user at .service.in \
+	units/systemd-static-nodes.service \
 	units/systemd-udevd.service \
 	units/systemd-udev-trigger.service \
 	units/systemd-udev-settle.service \
@@ -1939,11 +1941,13 @@ CLEANFILES += \
 	src/udev/udev.pc
 
 EXTRA_DIST += \
+	units/systemd-static-nodes.service.in \
 	units/systemd-udevd.service.in \
 	units/systemd-udev-trigger.service.in \
 	units/systemd-udev-settle.service.in
 
 CLEANFILES += \
+	units/systemd-static-nodes.service \
 	units/systemd-udevd.service \
 	units/systemd-udev-trigger.service \
 	units/systemd-udev-settle.service
@@ -1952,6 +1956,7 @@ SOCKETS_TARGET_WANTS += \
 	systemd-udevd-control.socket \
 	systemd-udevd-kernel.socket
 SYSINIT_TARGET_WANTS += \
+	systemd-static-nodes.service \
 	systemd-udevd.service \
 	systemd-udev-trigger.service
 
diff --git a/units/systemd-static-nodes.service.in b/units/systemd-static-nodes.service.in
new file mode 100644
index 0000000..3553226
--- /dev/null
+++ b/units/systemd-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 static device nodes in /dev
+DefaultDependencies=no
+Before=sysinit.target systemd-udevd.service
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create



More information about the systemd-commits mailing list