Get the cmdline instmod value in finish_install.py
modified: interface/ri_oper.py modified: operation/finish_install.py
This commit is contained in:
@@ -87,7 +87,6 @@ class Operation:
|
||||
process.stdin.close()
|
||||
while True:
|
||||
line = process.stdout.readline()
|
||||
print line
|
||||
if not line:
|
||||
break
|
||||
if line[0] == '@' and self.current_step < self.steps:
|
||||
|
||||
@@ -14,7 +14,10 @@ homedir = ri_data.StateGrid.home_dir
|
||||
shell = ri_data.StateGrid.shell
|
||||
|
||||
# run state grid custom scripts
|
||||
instmode = os.system("cat /proc/cmdline | sed 's/.*instmode=\([^ ]*\).*/\1/'")
|
||||
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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user