Correct getting instmode

modified:   interface/ri_inst_cli.py
	modified:   operation/finish_install/98state_grid_custom.py
This commit is contained in:
Peng Zhihui
2014-04-28 09:27:16 +08:00
parent b3e847c59c
commit bee7e14e77
2 changed files with 8 additions and 2 deletions

View File

@@ -36,7 +36,10 @@ def set_task_over():
# if re.match('instmode=',i):
# instmode = i.split('=')[1]
# break
instmode = os.environ["instmode"]
try:
instmode = os.environ["instmode"]
except:
instmode = 'Text'
screen = SnackScreen()
screen.drawRootText(0, 0, 'Rocky Security OS Install')
screen.pushHelpLine(' ')

View File

@@ -21,7 +21,10 @@ shell = ri_data.StateGrid.shell
# if re.match('instmode=',i):
# instmode = i.split('=')[1]
# break
instmode = os.environ["instmode"]
try:
instmode = os.environ["instmode"]
except:
instmode = 'Text'
if instmode == 'StateGrid':
os.system("cp -r /usr/lib/StateGrid /mnt/opt/")
os.system("chroot /mnt /opt/StateGrid/setup.sh %s %s %s" %(username, homedir, shell))