systemd/avoid-random-hangs-on-timeouts-due-lost-cwd.patch

30 lines
1.0 KiB
Diff

Found this during debugging an other problem. The issue was that
after ``sudo -i'' and a ``cd /usr/lib/systemd/system/'' followed
later by a shutdown may fail with (journalctl -b -1):
systemd-exit.service: Failed at step CHDIR spawning: /usr/bin/kill
which then caused the subsequent fault that umounting the users
home directories done by automount are busy.
---
units/user/systemd-exit.service.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: systemd-221/units/user/systemd-exit.service.in
===================================================================
--- systemd-221.orig/units/user/systemd-exit.service.in
+++ systemd-221/units/user/systemd-exit.service.in
@@ -10,8 +10,9 @@ Description=Exit the Session
Documentation=man:systemd.special(7)
DefaultDependencies=no
Requires=shutdown.target
-After=shutdown.target
+After=shutdown.target multi-user.target
[Service]
Type=oneshot
-ExecStart=@KILL@ -s 58 $MANAGERPID
+WorkingDirectory=/
+ExecStart=@KILL@ -s SIGRTMIN+24 $MANAGERPID