[gnome-session/benzea/re-add-on-failure] 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] Revert "Remove superfluous OnFailure= directives in target units"
- Date: Mon, 19 Oct 2020 09:54:48 +0000 (UTC)
commit e0f5576365b538524a7112c685637172024b661d
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 5296762d6..3ad2eb19b 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 b77125789..3ef2ecfeb 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 3e6d08313..b6cad85cd 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 29f95c54e..6552b4d4c 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 67dec0f0d..e13cc9eec 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 663040ee2..ce5879b20 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 e8d228e05..ea305558b 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 f7df86372..536d9c0f9 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]