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