[gnome-session/benzea/fix-shutdown-slice] data: Fix indirect conflict with exit.target via app.slice




commit b22ab85e29f35b3f66b540f5e8b34cf1b28ce48c
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Dec 3 13:45:36 2020 +0100

    data: Fix indirect conflict with exit.target via app.slice
    
    systemd v247 now puts services into app.slice by default. But app.slice
    will have a conflict with exit.target, which in turn means that we still
    get a conflict with exit.target indirectly.
    
    Fix it by adding the appropriate Slice=-.slice into
    gnome-session-restart-dbus.service. Also update the note in
    gnome-session-shutdown.service to point out the requirements.
    
    Closes: #74

 data/gnome-session-restart-dbus.service.in | 5 +++--
 data/gnome-session-shutdown.target         | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/data/gnome-session-restart-dbus.service.in b/data/gnome-session-restart-dbus.service.in
index e90f6bc8f..5dbe76570 100644
--- a/data/gnome-session-restart-dbus.service.in
+++ b/data/gnome-session-restart-dbus.service.in
@@ -1,9 +1,10 @@
 [Unit]
 Description=Restart DBus after GNOME Session shutdown
 
-# Allow exit.target to start even if this unit is started with replace-irreversibly
-# Also put it into a slice that doesn't have such implicit dependencies
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# Note that we also need to make sure we are in the root slice for this to work.
 DefaultDependencies=no
+Slice=-.slice
 
 [Service]
 Type=notify
diff --git a/data/gnome-session-shutdown.target b/data/gnome-session-shutdown.target
index 607dc6e71..4b5e3c9b5 100644
--- a/data/gnome-session-shutdown.target
+++ b/data/gnome-session-shutdown.target
@@ -1,9 +1,11 @@
 [Unit]
 Description=Shutdown running GNOME Session
 
-# Allow exit.target to start even if this unit is started with replace-irreversibly
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# Note that we also need to make sure we are in the root slice for this to work.
 # The same is needed for all (weak) dependencies
 DefaultDependencies=no
+Slice=-.slice
 
 Conflicts=graphical-session.target graphical-session-pre.target
 After=graphical-session.target graphical-session-pre.target


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]