From 8c11aac1d739f5e60822f65f5179d8c4cc212732 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 11 Apr 2013 21:14:40 +0200 Subject: 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. --- units/systemd-static-nodes.service.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 units/systemd-static-nodes.service.in (limited to 'units') diff --git a/units/systemd-static-nodes.service.in b/units/systemd-static-nodes.service.in new file mode 100644 index 0000000000..3553226c67 --- /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 -- cgit v1.2.3-54-g00ecf