Skip to content

Commit

Permalink
Fix wrong dracut timeout message
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 87780c8)

Resolves: RHEL-5638
  • Loading branch information
jkonecny12 committed Jan 16, 2024
1 parent 83f02e9 commit 05c2e3d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dracut/anaconda-error-reporting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###############"

Expand Down

0 comments on commit 05c2e3d

Please sign in to comment.