Blob Blame History Raw
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gena Makhomed <gmm@csdoc.com>
Date: Thu, 1 Jul 2021 01:07:46 +0200
Subject: [PATCH] grub-boot-success.timer: Only run if not in a container

The grub-boot-success.timer should be disabled inside a container since it
leads to the following error:

Jan 09 22:56:38 test sshd[8786]: pam_unix(sshd:session): session opened for user www(uid=1000) by (uid=0)
Jan 09 22:58:39 test systemd[8857]: Starting Mark boot as successful...
Jan 09 22:58:39 test systemd[8857]: grub-boot-success.service: Main process exited, code=exited, status=1/FAILURE
Jan 09 22:58:39 test systemd[8857]: grub-boot-success.service: Failed with result 'exit-code'.
Jan 09 22:58:39 test systemd[8857]: Failed to start Mark boot as successful.
Jan 09 22:58:39 test grub2-set-bootflag[10034]: Error canonicalizing /boot/grub2/grubenv filename: No such file or directory

Resolves: rhbz#1914571
---
 docs/grub-boot-success.timer | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/grub-boot-success.timer b/docs/grub-boot-success.timer
index 5d8fcba21aa..406f1720056 100644
--- a/docs/grub-boot-success.timer
+++ b/docs/grub-boot-success.timer
@@ -1,6 +1,7 @@
 [Unit]
 Description=Mark boot as successful after the user session has run 2 minutes
 ConditionUser=!@system
+ConditionVirtualization=!container
 
 [Timer]
 OnActiveSec=2min