anaconda/anaconda-40.22.3.13/scripts/anaconda-pre-log-gen

17 lines
512 B
Text
Raw Normal View History

2024-11-14 21:39:56 -08:00
#! /bin/bash
# Script to be run by anaconda-pre service before anaconda starts to gather
# information about previous system state
# where the resulting logs will be stored
TARGET_DIRECTORY=/tmp/pre-anaconda-logs
# do not produce any logs unless debug is enabled
grep -E -q "\<debug\>|\<inst\.debug\>" /proc/cmdline || exit 0
mkdir -m 700 ${TARGET_DIRECTORY}
lsblk -a > ${TARGET_DIRECTORY}/block_devices.log
dmesg > ${TARGET_DIRECTORY}/kernel_ring_buffer.log
lvmdump -u -l -s -d ${TARGET_DIRECTORY}/lvmdump