anaconda/backport-Fix-wrong-dracut-timeout-message.patch
2025-01-17 09:17:20 +08:00

45 lines
1.6 KiB
Diff

From 87780c8ba530f10cc4e489c387fc34084f98afee Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Fri, 31 Mar 2023 10:20:27 +0200
Subject: [PATCH] Fix wrong dracut timeout message
We added Anaconda error reporting when Dracut timeout during boot. If
the reason is known issue we will print that to a user. However, in case
it is not known the code failed with message:
... /run/anaconda/initrd_errors.txt: No such file or directory
To fix this just print "Reason unknown" and not execute rest of the
code.
Reference:https://github.com/rhinstaller/anaconda/commit/87780c8ba530f10cc4e489c387fc34084f98afee
Conflict:NA
---
dracut/anaconda-error-reporting.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dracut/anaconda-error-reporting.sh b/dracut/anaconda-error-reporting.sh
index c9cca5cea2e..b410cd667e5 100755
--- a/dracut/anaconda-error-reporting.sh
+++ b/dracut/anaconda-error-reporting.sh
@@ -14,9 +14,13 @@ warn "Please also note that the 'inst.' prefix is now mandatory."
warn "# #"
warn "#### Installer errors encountered during boot: ####"
warn "# #"
-while read -r line; do
- warn "$line"
-done < /run/anaconda/initrd_errors.txt
+if ! [ -e /run/anaconda/initrd_errors.txt ]; then
+ warn "Reason unknown"
+else
+ while read -r line; do
+ warn "$line"
+ done < /run/anaconda/initrd_errors.txt
+fi
warn "# #"
warn "############# Anaconda installer errors end ###############"
--
2.43.0