ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
1abbee
From f77d58374ccd2e3d9c886e59020f1b32e97f2bdc Mon Sep 17 00:00:00 2001
1abbee
From: Michal Sekletar <msekletar@users.noreply.github.com>
1abbee
Date: Mon, 29 Aug 2016 14:49:20 +0200
1abbee
Subject: [PATCH] units: remove udev control socket when systemd stops the
1abbee
 socket unit (#49)
1abbee
1abbee
Mere presence of the socket in the filesystem makes
1abbee
udev_queue_get_udev_is_active() return that udev is running. Note that,
1abbee
udev on exit doesn't unlink control socket nor does systemd. Thus socket
1abbee
stays around even when both daemon and socket are stopped. This causes
1abbee
problems for cryptsetup because when it detects running udev it launches
1abbee
synchronous operations that *really* require udev. This in turn may
1abbee
cause blocking and subsequent timeout in systemd-cryptsetup on reboot
1abbee
while machine is in a state that udev and its control socket units are
1abbee
stopped, e.g. emergency mode.
1abbee
1abbee
Fixes #2477
1abbee
1abbee
Cherry-picked from: a2de10775194edec51b1e88d20a380724a3dc716
1abbee
Resolves: #1370133
1abbee
---
1abbee
 units/systemd-udevd-control.socket | 1 +
1abbee
 1 file changed, 1 insertion(+)
1abbee
1abbee
diff --git a/units/systemd-udevd-control.socket b/units/systemd-udevd-control.socket
181b3f
index 8330a1c03..46f704ed7 100644
1abbee
--- a/units/systemd-udevd-control.socket
1abbee
+++ b/units/systemd-udevd-control.socket
1abbee
@@ -17,3 +17,4 @@ Service=systemd-udevd.service
1abbee
 ListenSequentialPacket=/run/udev/control
1abbee
 SocketMode=0600
1abbee
 PassCredentials=yes
1abbee
+RemoveOnStop=yes