Files
new_install/operation/finish_install/10collect_install_info.sh

50 lines
1.2 KiB
Bash
Executable File

#!/bin/bash -
#===============================================================================
#
# FILE: 01record_install_info.sh
#
# USAGE: ./01record_install_info.sh
#
# DESCRIPTION: record install infomation
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: PengZhihui (), zhihuipeng@linx-info.com@linx-info.com
# COMPANY: linx-info
# COPYRIGHT: Copyright 2001-2014 Linx Technology Co.,Ltd.
# CREATED: 2014年03月26日 08时48分46秒 CST
# REVISION: ---
#===============================================================================
source ./functions
mkdir -p $TARGET/var/log/installer
rec_file="$TARGET/var/log/installer/os-install-info.txt"
touch ${rec_file}
msg () {
printf "=%.0s" {1..70}
printf "\n"
}
echo 'Install Date' >${rec_file}
echo $(date) >>${rec_file}
msg >>${rec_file}
echo 'Install Os Version' >>${rec_file}
cat /tag >>${rec_file}
msg >>${rec_file}
echo 'Install Kernel Src Info' >>${rec_file}
cat $TARGET/boot/kernel_src_info >>${rec_file}
msg >>${rec_file}
chroot $TARGET chmod 444 /var/log/installer/os-install-info.txt
#some fs don't support extended attr
#chroot $TARGET chattr +i /var/log/installer/os-install-info.txt