文件操作 - anaconda-pre-log-gen
返回文件管理
返回主菜单
删除本文件
文件: /usr/libexec/anaconda/anaconda-pre-log-gen
编辑文件内容
#! /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 BOOT_OPTIONS_FILE=/proc/cmdline DEBUG_ENABLED=`cat $BOOT_OPTIONS_FILE | egrep -c "\<debug\>|\<inst\.debug\>"` # do not produce any logs unless debug is enabled [ $DEBUG_ENABLED == '0' ] && exit 0 mkdir ${TARGET_DIRECTORY} lsblk -a > ${TARGET_DIRECTORY}/block_devices.log dmesg > ${TARGET_DIRECTORY}/kernel_ring_buffer.log lvmdump -u -l -s -d ${TARGET_DIRECTORY}/lvmdump
修改文件时间
将文件时间修改为当前时间的前一年
删除文件