Blame 0004-fix-wait-12-hours-before-halt-on-media-check-fail.patch

ff27f8
From 5beddfca4192a28898904610a54d1cbc58d5856b Mon Sep 17 00:00:00 2001
Adam Williamson 81c46b
From: Adam Williamson <awilliam@redhat.com>
Adam Williamson 81c46b
Date: Sun, 29 Oct 2023 21:19:36 -0700
ff27f8
Subject: [PATCH 04/10] fix: wait 12 hours before halt on media check fail
Adam Williamson 81c46b
Adam Williamson 81c46b
If a modesetting driver has been loaded by the time the media
Adam Williamson 81c46b
check happens, halting the system (as we currently do immediately
Adam Williamson 81c46b
if the check fails) blanks the screen, which is confusing for
Adam Williamson 81c46b
the user. This adds a warning message and a 12-hour wait before
Adam Williamson 81c46b
the system is eventually halted, so the user can see the media
Adam Williamson 81c46b
check failure and (presumably) reboot and fix the medium.
Adam Williamson 81c46b
Adam Williamson 81c46b
It also tweaks the text of the failure message not to call it a
Adam Williamson 81c46b
"CD check", since it's not 1998 any more.
Adam Williamson 81c46b
Adam Williamson 81c46b
https://bugzilla.redhat.com/show_bug.cgi?id=2246410
Adam Williamson 81c46b
Adam Williamson 81c46b
Signed-off-by: Adam Williamson <awilliam@redhat.com>
ff27f8
ff27f8
(Cherry-picked a1b346121da44908b2685d8ef1b5e68b57829b2b from PR#2545)
Adam Williamson 81c46b
---
Adam Williamson 81c46b
 modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++-
Adam Williamson 81c46b
 1 file changed, 3 insertions(+), 1 deletion(-)
Adam Williamson 81c46b
Adam Williamson 81c46b
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
Adam Williamson 81c46b
index e8083394..3fccda5f 100755
Adam Williamson 81c46b
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
Adam Williamson 81c46b
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
Adam Williamson 81c46b
@@ -76,7 +76,9 @@ if [ -n "$check" ]; then
Adam Williamson 81c46b
         checkisomd5 --verbose "$check_dev"
Adam Williamson 81c46b
     fi
Adam Williamson 81c46b
     if [ $? -eq 1 ]; then
Adam Williamson 81c46b
-        die "CD check failed!"
Adam Williamson 81c46b
+        warn "Media check failed! We do not recommend using this medium. System will halt in 12 hours"
Adam Williamson 81c46b
+        sleep 43200
Adam Williamson 81c46b
+        die "Media check failed!"
Adam Williamson 81c46b
         exit 1
Adam Williamson 81c46b
     fi
Adam Williamson 81c46b
     type plymouth > /dev/null 2>&1 && plymouth --show-splash
Adam Williamson 81c46b
-- 
ff27f8
2.42.0
Adam Williamson 81c46b