Correct the problem of reumount operation

Text mode uses python-newt to show install progress

	modified:   interface/ri_inst_cli.py
	modified:   interface/ri_install.py
	modified:   operation/exec_finish_install.sh
	modified:   operation/functions
	modified:   operation/partition_disks.sh
This commit is contained in:
Peng Zhihui
2014-03-06 16:07:57 +08:00
parent 47eca43729
commit a2e217c99b
5 changed files with 75 additions and 25 deletions

View File

@@ -16,10 +16,9 @@
# Ling Fen 2010-09-04 create
#
import time
import ri_progress
from ri_oper import language, Rate
import dialog
from snack import *
def set_task(task_name):
ri_progress.i_operation = task_name
@@ -34,18 +33,32 @@ def set_task_over():
cmdline = f.readline()
f.close()
instmode = cmdline.split(' ')[0].split('=')[1]
screen = SnackScreen()
screen.drawRootText(0, 0, 'Rocky Security OS Install')
screen.pushHelpLine(' ')
g = GridForm(screen, 'Rocky Install', 1, 3)
txt1 = Label('Automated Install Rocky OS successfully, and the OS will reboot in 10 seconds ......')
txt2 = Label('Install Rocky OS successfully, do you want to reboot ?')
elabel = Label('')
bb = ButtonBar(screen, (('Ok','ok'),('Cancel','cancel')))
g.add(elabel, 0, 1)
if instmode == 'Auto' or instmode == 'StateGrid':
print 'The system will reboot in 10 seconds ......'
time.sleep(10)
g.add(txt1, 0, 1)
g.setTimer(10000)
g.runOnce()
screen.finish()
return True
else:
ifreboot=dialog.Dialog()
ret=ifreboot.yesno("Rocky system installation successfully, do you want to reboot?")
if ret == 0:
g.add(txt2, 0, 0)
g.add(bb, 0, 2)
res = g.run()
screen.refresh()
if bb.buttonPressed(res) == 'ok':
screen.finish()
return True
else:
screen.finish()
return False
return False
def root_destroy():
pass