Files
new_install/operation/exec_finish_install.sh
Peng Zhihui 21c3272eea Add auto install, HdInstall and state grid custom install
new file:   AutoInstall/auto_install.py
	new file:   StateGrid/state_grid.py
	modified:   interface/ri_data.py
	modified:   operation/exec_finish_install.sh
	new file:   operation/finish_install.py
	renamed:    operation/99finish_install.sh -> operation/finish_install/99finish_install.sh
	new file:   xml/install.xml
2014-02-24 10:44:53 +08:00

58 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# DESCRIPTION: chroot $TARGET excute script under /var/finish_install/.
# copy 99finish_install to /var/finish_install/, then one
# by one copy the script in /var/finish_install/ to $TARGET
# with sequence, and then chroot $TARGET to execte it.
#
# SCRIPT NAME: exec_finish_install.sh
#
# Input: stdin
# 1. script name which need run after installation
#
# Output:
# NULL
# Return value:
# dependency return value of execute script, if 0 is success.
#
# AUTHOR: Qin Bo
#
# EMAIL: bqin@linx-info.com
#
# DATE: 2010-08-27
#
# HISTORY:
# REVISOR DATE MODIFICATION
# Qin Bo 2010-08-27 create
#
#
#
source ./functions
prep ()
{
for mp in /dev /proc /sys
do
mount --bind -n $mp "$TARGET$mp"
done
# copy the script to $TARGET/opt
cp -r /usr/lib/new_install/operation/finish_install $TARGET/opt
}
main ()
{
prep
info "Running finish install"
/usr/bin/python finish_install.py >>$DEV_LOG 2>&1
info "Running finish install success"
[ ! -c "$LOG_FILE" ] && cp $LOG_FILE "$TARGET/var/log"
[ ! -c "/var/install/install.xml" ] && cp "/var/install/install.xml" "$TARGET/var/log"
[ ! -c "$DEV_LOG" ] && cp $DEV_LOG "$TARGET/var/log" || true
}
#FINISH_INSTALL_DIR="/var/finish_install"
main "$@"