[gnome-session/benzea/re-add-on-failure: 13/13] Revert "Remove superfluous OnFailure= directives in target units"
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/re-add-on-failure: 13/13] Revert "Remove superfluous OnFailure= directives in target units"
- Date: Tue, 23 Feb 2021 16:26:17 +0000 (UTC)
commit 67e87ef415df1fcea57de47d4b734aba0b4c5c0d
Author: Benjamin Berg <bberg redhat com>
Date: Mon Oct 19 11:53:11 2020 +0200
Revert "Remove superfluous OnFailure= directives in target units"
Target units can indeed fail if a dependency fails. As such, it makes
sense to have the OnFailure= in there. systemd just incorrectly warned
about it for a while. See
https://github.com/systemd/systemd/commit/94d1ddbd7cd15b1073757eb5ae0645c83f0b414c
This reverts commit 11ae5b4cf00e44ba4024506835bd7cafdbf5f023.
data/gnome-session-failed.target | 2 ++
data/gnome-session-initialized.target | 2 ++
data/gnome-session-pre.target | 2 ++
data/gnome-session-wayland.target | 3 +++
data/gnome-session-x11.target | 3 +++
data/gnome-session-x11@.target | 2 ++
data/gnome-session.target | 2 ++
data/gnome-session@.target | 2 ++
8 files changed, 18 insertions(+)
---
diff --git a/data/gnome-session-failed.target b/data/gnome-session-failed.target
index 5296762d..3ad2eb19 100644
--- a/data/gnome-session-failed.target
+++ b/data/gnome-session-failed.target
@@ -1,5 +1,7 @@
[Unit]
Description=GNOME Session Failed
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
# We need an initialized session
Requisite=gnome-session-initialized.target
diff --git a/data/gnome-session-initialized.target b/data/gnome-session-initialized.target
index b7712578..3ef2ecfe 100644
--- a/data/gnome-session-initialized.target
+++ b/data/gnome-session-initialized.target
@@ -1,5 +1,7 @@
[Unit]
Description=GNOME Session is initialized
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
DefaultDependencies=no
RefuseManualStart=yes
RefuseManualStop=yes
diff --git a/data/gnome-session-pre.target b/data/gnome-session-pre.target
index 3e6d0831..b6cad85c 100644
--- a/data/gnome-session-pre.target
+++ b/data/gnome-session-pre.target
@@ -1,5 +1,7 @@
[Unit]
Description=Tasks to be run before GNOME Session starts
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
DefaultDependencies=no
RefuseManualStart=yes
RefuseManualStop=yes
diff --git a/data/gnome-session-wayland.target b/data/gnome-session-wayland.target
index 29f95c54..6552b4d4 100644
--- a/data/gnome-session-wayland.target
+++ b/data/gnome-session-wayland.target
@@ -1,5 +1,8 @@
[Unit]
Description=GNOME Wayland Session
+# On wayland all is lost, do a shutdown
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
# Avoid default After/Before rules
DefaultDependencies=no
diff --git a/data/gnome-session-x11.target b/data/gnome-session-x11.target
index 67dec0f0..e13cc9ee 100644
--- a/data/gnome-session-x11.target
+++ b/data/gnome-session-x11.target
@@ -1,5 +1,8 @@
[Unit]
Description=GNOME X11 Session
+# On X11, try to show the fail screen
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
# Avoid default After/Before rules
DefaultDependencies=no
diff --git a/data/gnome-session-x11@.target b/data/gnome-session-x11@.target
index 663040ee..ce5879b2 100644
--- a/data/gnome-session-x11@.target
+++ b/data/gnome-session-x11@.target
@@ -1,5 +1,7 @@
[Unit]
Description=GNOME X11 Session (session: %i)
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
DefaultDependencies=no
# Start happens explicitly
RefuseManualStart=no
diff --git a/data/gnome-session.target b/data/gnome-session.target
index e8d228e0..ea305558 100644
--- a/data/gnome-session.target
+++ b/data/gnome-session.target
@@ -1,5 +1,7 @@
[Unit]
Description=GNOME Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
DefaultDependencies=no
RefuseManualStart=yes
RefuseManualStop=yes
diff --git a/data/gnome-session@.target b/data/gnome-session@.target
index f7df8637..536d9c0f 100644
--- a/data/gnome-session@.target
+++ b/data/gnome-session@.target
@@ -1,5 +1,7 @@
[Unit]
Description=GNOME Session (session: %i)
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
DefaultDependencies=no
RefuseManualStart=yes
RefuseManualStop=yes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]