dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0256-grub-boot-success.timer-Add-a-few-Conditions-for-run.patch

d9d99f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d9d99f
From: Hans de Goede <hdegoede@redhat.com>
d9d99f
Date: Mon, 3 Sep 2018 13:01:58 +0200
d9d99f
Subject: [PATCH] grub-boot-success.timer: Add a few Conditions for running the
d9d99f
 timer
d9d99f
d9d99f
Add 2 Conditions for running the boot-success timer / service:
d9d99f
d9d99f
1) Do not run it for system users, this fixes errors about gdm not being
d9d99f
allowed to use pkexec when the greeter session lasts for more then 2 minutes:
d9d99f
https://bugzilla.redhat.com/show_bug.cgi?id=1592201#c6
d9d99f
d9d99f
2) Do not run the timer when pkexec is not available (on minimal installs)
d9d99f
since then it will just lead to a bunch of errors without doing anything:
d9d99f
https://bugzilla.redhat.com/show_bug.cgi?id=1619445
d9d99f
d9d99f
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
d9d99f
---
d9d99f
 docs/grub-boot-success.timer | 2 ++
d9d99f
 1 file changed, 2 insertions(+)
d9d99f
d9d99f
diff --git a/docs/grub-boot-success.timer b/docs/grub-boot-success.timer
d9d99f
index 221b532781b..67bd829b795 100644
d9d99f
--- a/docs/grub-boot-success.timer
d9d99f
+++ b/docs/grub-boot-success.timer
d9d99f
@@ -1,5 +1,7 @@
d9d99f
 [Unit]
d9d99f
 Description=Mark boot as successful after the user session has run 2 minutes
d9d99f
+ConditionUser=!@system
d9d99f
+ConditionPathExists=/usr/bin/pkexec
d9d99f
 
d9d99f
 [Timer]
d9d99f
 OnActiveSec=2min