Files
new_install/operation/finish_install.py
Peng Zhihui 0dc4b94744 Correct a path 'proc/cmdline' -> '/proc/cmdline'
modified:   operation/finish_install.py
2014-02-24 14:02:20 +08:00

27 lines
641 B
Python
Executable File

#!/usr/bin/env python
# run finish_install scripts
#
import os,sys
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()
f.close()
instmode = cmdline.split(' ')[0].split('=')[1]
if instmode == 'StateGrid':
os.system("chroot /mnt /opt/finish_install/StateGrid/setup.sh %s %s %s" %(username, homedir, shell))
# run post_add scripts
os.system("chroot /mnt /opt/finish_install/99finish_install.sh")