Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions test/kickstart-templates/includes/onerror-logs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%onerror --log=/dev/console --erroronfail
# Enable nullglob to avoid iterating if no *.log files exist
shopt -s nullglob

# Print Anaconda logs to the console on error
echo "Displaying log files on installation failure"
for log in /tmp/*.log ; do
echo "---- ${log} ----"
cat "${log}"
echo "---- ----"
done
echo "Finished diplaying log files on installation failure"

# Disable nullglob to restore the default behavior
shopt -u nullglob

%end
2 changes: 2 additions & 0 deletions test/kickstart-templates/kickstart-bootc.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
%include /post-bootc-wa.cfg

%end

%include /onerror-logs.cfg
2 changes: 2 additions & 0 deletions test/kickstart-templates/kickstart-centos.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
%include /post-cos9rpm.cfg

%end

%include /onerror-logs.cfg
2 changes: 2 additions & 0 deletions test/kickstart-templates/kickstart-liveimg.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
%include /post-fips.cfg

%end

%include /onerror-logs.cfg
2 changes: 2 additions & 0 deletions test/kickstart-templates/kickstart-offline.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ network --no-activate --nodefroute --hostname=REPLACE_HOST_NAME
sudo semanage permissive -a virt_qemu_ga_t

%end

%include /onerror-logs.cfg
2 changes: 2 additions & 0 deletions test/kickstart-templates/kickstart.ks.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
%include /post-fips.cfg

%end

%include /onerror-logs.cfg