#!/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")