From 3533b49e74a42eea5c9413cf1e6a2f74589731c7 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Tue, 15 Aug 2017 14:11:23 +0100 Subject: [PATCH 1/2] units: Sockets= already implies Wants= and After= (systemd-udevd.service) I grepped for other `After=` on a socket unit as well. This was the only instance. --- units/systemd-udevd.service.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index fc037b5a5c..5860545801 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -9,8 +9,7 @@ Description=udev Kernel Device Manager 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 systemd-sysusers.service +After=systemd-sysusers.service Before=sysinit.target ConditionPathIsReadWrite=/sys From 1d422b153bf9e9409e95e7596a2ea59cdb9e7b19 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Tue, 15 Aug 2017 14:22:44 +0100 Subject: [PATCH 2/2] units: order service(s) before udevd, not udev-trigger (coldplug) Since hotplugs happen as soon as udevd is started, there is not much sense in giving udev-trigger an After= dependency on any service. The device could be hotplugged before coldplug starts. This is intended to avoid the race window where we create the hwdb with the wrong selinux context (then fix it up afterwards). https://github.com/systemd/systemd/issues/3458#issuecomment-322444107 --- units/systemd-udev-trigger.service.in | 2 +- units/systemd-udevd.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/units/systemd-udev-trigger.service.in b/units/systemd-udev-trigger.service.in index 1e04d11fe3..0c33909cee 100644 --- a/units/systemd-udev-trigger.service.in +++ b/units/systemd-udev-trigger.service.in @@ -10,7 +10,7 @@ Description=udev Coldplug all Devices Documentation=man:udev(7) man:systemd-udevd.service(8) DefaultDependencies=no Wants=systemd-udevd.service -After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-hwdb-update.service +After=systemd-udevd-kernel.socket systemd-udevd-control.socket Before=sysinit.target ConditionPathIsReadWrite=/sys diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index 5860545801..3b92c6a866 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -9,7 +9,7 @@ Description=udev Kernel Device Manager Documentation=man:systemd-udevd.service(8) man:udev(7) DefaultDependencies=no -After=systemd-sysusers.service +After=systemd-sysusers.service systemd-hwdb-update.service Before=sysinit.target ConditionPathIsReadWrite=/sys