|
|
4e44f9 |
From a4743b9b2b355f84da3904e7da93ec3c7a521895 Mon Sep 17 00:00:00 2001
|
|
|
4e44f9 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
4e44f9 |
Date: Fri, 26 Jul 2019 14:06:16 -0400
|
|
|
4e44f9 |
Subject: [PATCH] data: reap gdm sessions on shutdown
|
|
|
4e44f9 |
|
|
|
4e44f9 |
If GDM gets shutdown we should make sure all sessions get shutdown too.
|
|
|
4e44f9 |
|
|
|
4e44f9 |
This is a bit of a safety net in case any processes in the session are
|
|
|
4e44f9 |
lingering after the orderly shutdown.
|
|
|
4e44f9 |
---
|
|
|
4e44f9 |
data/gdm.service.in | 1 +
|
|
|
4e44f9 |
1 file changed, 1 insertion(+)
|
|
|
4e44f9 |
|
|
|
4e44f9 |
diff --git a/data/gdm.service.in b/data/gdm.service.in
|
|
|
4e44f9 |
index 17e8a8de..195bd0fd 100644
|
|
|
4e44f9 |
--- a/data/gdm.service.in
|
|
|
4e44f9 |
+++ b/data/gdm.service.in
|
|
|
4e44f9 |
@@ -1,33 +1,34 @@
|
|
|
4e44f9 |
[Unit]
|
|
|
4e44f9 |
Description=GNOME Display Manager
|
|
|
4e44f9 |
|
|
|
4e44f9 |
# replaces the getty
|
|
|
4e44f9 |
Conflicts=getty@tty${GDM_INITIAL_VT}.service
|
|
|
4e44f9 |
After=getty@tty${GDM_INITIAL_VT}.service
|
|
|
4e44f9 |
|
|
|
4e44f9 |
# replaces plymouth-quit since it quits plymouth on its own
|
|
|
4e44f9 |
Conflicts=${PLYMOUTH_QUIT_SERVICE}
|
|
|
4e44f9 |
After=${PLYMOUTH_QUIT_SERVICE}
|
|
|
4e44f9 |
|
|
|
4e44f9 |
# Needs all the dependencies of the services it's replacing
|
|
|
4e44f9 |
# pulled from getty@.service and ${PLYMOUTH_QUIT_SERVICE}
|
|
|
4e44f9 |
# (except for plymouth-quit-wait.service since it waits until
|
|
|
4e44f9 |
# plymouth is quit, which we do)
|
|
|
4e44f9 |
After=rc-local.service plymouth-start.service systemd-user-sessions.service
|
|
|
4e44f9 |
|
|
|
4e44f9 |
# GDM takes responsibility for stopping plymouth, so if it fails
|
|
|
4e44f9 |
# for any reason, make sure plymouth still stops
|
|
|
4e44f9 |
OnFailure=plymouth-quit.service
|
|
|
4e44f9 |
|
|
|
4e44f9 |
[Service]
|
|
|
4e44f9 |
ExecStart=${sbindir}/gdm
|
|
|
4e44f9 |
+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'
|
|
|
4e44f9 |
KillMode=mixed
|
|
|
4e44f9 |
Restart=always
|
|
|
4e44f9 |
IgnoreSIGPIPE=no
|
|
|
4e44f9 |
BusName=org.gnome.DisplayManager
|
|
|
4e44f9 |
EnvironmentFile=-${LANG_CONFIG_FILE}
|
|
|
4e44f9 |
ExecReload=/bin/kill -SIGHUP $MAINPID
|
|
|
4e44f9 |
KeyringMode=shared
|
|
|
4e44f9 |
|
|
|
4e44f9 |
[Install]
|
|
|
4e44f9 |
Alias=display-manager.service
|
|
|
4e44f9 |
--
|
|
|
4e44f9 |
2.32.0
|
|
|
4e44f9 |
|