Blame SOURCES/0004-data-reap-gdm-sessions-on-shutdown.patch

81f0aa
From f32adbe9bf26d502cb055b3a6cb98fc57e06bf13 Mon Sep 17 00:00:00 2001
81f0aa
From: Ray Strode <rstrode@redhat.com>
81f0aa
Date: Fri, 26 Jul 2019 14:06:16 -0400
81f0aa
Subject: [PATCH 4/4] data: reap gdm sessions on shutdown
81f0aa
81f0aa
If GDM gets shutdown we should make sure all sessions get shutdown too.
81f0aa
81f0aa
This is a bit of a safety net in case any processes in the session are
81f0aa
lingering after the orderly shutdown.
81f0aa
---
81f0aa
 data/gdm.service.in | 1 +
81f0aa
 1 file changed, 1 insertion(+)
81f0aa
81f0aa
diff --git a/data/gdm.service.in b/data/gdm.service.in
81f0aa
index 72201c1fd..202ab6753 100644
81f0aa
--- a/data/gdm.service.in
81f0aa
+++ b/data/gdm.service.in
81f0aa
@@ -21,6 +21,7 @@ OnFailure=plymouth-quit.service
81f0aa
 
81f0aa
 [Service]
81f0aa
 ExecStart=@sbindir@/gdm
81f0aa
+ExecStopPost=-/usr/bin/bash -c 'for f in /run/systemd/sessions/*; do [ -f $f ] && /usr/bin/fgrep -q SERVICE=gdm $f && loginctl terminate-session $(basename $f); done'
81f0aa
 KillMode=mixed
81f0aa
 Restart=always
81f0aa
 IgnoreSIGPIPE=no
81f0aa
-- 
81f0aa
2.18.1
81f0aa