summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2019-10-09 22:38:38 +0200
committerBenjamin Berg <bberg@redhat.com>2019-11-25 16:29:32 +0100
commite1e4ab454c95c3d9f2376c28fb3bd4b593191156 (patch)
tree01c33c6e3db92e0ff6226af79e3c7593c5b5c8a9 /data
parente6cc020f81ef92fccfa90f5f9589df645e346b7e (diff)
downloadgnome-session-e1e4ab454c95c3d9f2376c28fb3bd4b593191156.tar.gz
data: Ensure shutdown target does not keep units loaded
The shutdown target has explicit conflicts on some user units, this means that as long as it is active, it will keep those units loaded. We could probably reverse the conflicts to prevent this from happening. But, it makes sense to set StopWhenUnneeded=true anyway and doing so also means that the corresponding units can be unloaded after logout.
Diffstat (limited to 'data')
-rw-r--r--data/gnome-session-shutdown.target6
1 files changed, 5 insertions, 1 deletions
diff --git a/data/gnome-session-shutdown.target b/data/gnome-session-shutdown.target
index 84afb001..607dc6e7 100644
--- a/data/gnome-session-shutdown.target
+++ b/data/gnome-session-shutdown.target
@@ -16,7 +16,11 @@ After=gnome-session.target gnome-session-manager.target
Conflicts=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target
After=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target
-# Could we set StopWhenUnneeded=true or would that prevent the service to start?
+# We need to make sure this unit is stopped; primarily so that the tree of
+# units that we created is completely cleaned.
+# Note that this can also be improved by reversing the conflicts above and
+# not listing them in the shutdown unit.
+StopWhenUnneeded=true
# We trigger a restart of DBus after reaching the shutdown target this
# is a workaround so that DBus services that do not connect to the