Files
new_install/operation/finish_install/98state_grid_custom.py
Xu, Shunxuan e7ef3d5b16 添加40安装选项及支持700内核的dmraid识别
modified:   main/begin-install
	modified:   operation/finish_install/98state_grid_custom.py
	new file:   operation/finish_install/exec_install_40.sh
	modified:   operation/functions
	new file:   xml/install-40-d5000.xml

Signed-off-by: Xu, Shunxuan <sxxu@linx-info.com>
2018-11-06 11:21:34 +08:00

34 lines
863 B
Python
Executable File

#!/usr/bin/env python
# run finish_install scripts
#
import os,sys,re
sys.path.append('../interface')
import ri_data
# get data from install.xml
ri_data.init_from_xml()
username = ri_data.StateGrid.username
homedir = ri_data.StateGrid.home_dir
shell = ri_data.StateGrid.shell
# run state grid custom scripts
#f = open('/proc/cmdline', 'r')
#cmdline = f.readline().strip()
#f.close()
#for i in cmdline.split(' '):
# if re.match('instmode=',i):
# instmode = i.split('=')[1]
# break
try:
instmode = os.environ["instmode"]
except:
instmode = 'Text'
if instmode == 'StateGrid':
os.system("cp -r /usr/lib/StateGrid /mnt/opt/")
os.system("source /usr/lib/new_install/operation/finish_install/exec_install_40.sh")
os.system("chroot /mnt /opt/StateGrid/setup.sh %s %s %s" %(username, homedir, shell))
os.system("rm -rf /mnt/opt/StateGrid")