rewrite text isntall interface and partition-tool

modified:   dialog/di_dialog.py
	modified:   dialog/di_main.py
	new file:   dialog/di_newt.py
	modified:   interface/ri_inst_cli.py
	modified:   interface/ri_oper.py
	new file:   new_partition/finddisk.sh
	new file:   new_partition/list-devices
	new file:   new_partition/new_partition.py
	new file:   new_partition/parted_devices
	new file:   new_partition/parted_devices.py
	modified:   operation/configure_bootloader_cnf.sh
	modified:   operation/copy_kernels.sh
	modified:   operation/install_bootloader.sh
	modified:   xml/config.xml
	modified:   xml/dependency.xml
This commit is contained in:
Peng Zhihui
2013-12-20 11:10:32 +08:00
parent 1666ccbe3a
commit 3c0236842a
15 changed files with 1663 additions and 49 deletions

View File

@@ -27,8 +27,8 @@ def set_task_scale():
print "%.2f" %float(Rate.value)
def set_task_over():
string = raw_input("Rocky system installation successfully, are your restart?[Y]")
if string.lower() == "y":
string = raw_input("Rocky system installation successfully, do you want to reboot?[Y]")
if string.lower() == "y" or string == "":
return True
return False

View File

@@ -321,7 +321,7 @@ class BootLoader(Operation):
Operation.__init__(self,"Install bootloader",u"安装引导程序","install_bootloader.sh",scr)
self.return_value[2]=("Bootloader type hasn't been specified",u"没有指定引导程序的类型")
self.return_value[3]=("Bootloader hasn't been implemented",u"没有实现bootloader")
self.return_value[127]=("No tool to bootloader. E.g grub",u"没有安装引导程序的工具。如grub等")
self.return_value[127]=("No tool to bootloader. E.g grub",u"没有安装引导程序的工具。如grub2")
def get_arguments(self):
if self.getarch() == "ppc64":
@@ -329,7 +329,7 @@ class BootLoader(Operation):
elif self.getarch() == "ia64":
return ["-t elilo"]
else:
return ["-t grub"]
return ["-t grub2"]
class ConfigureBootloader(Operation):
"""class for configure bootloader file"""
@@ -347,7 +347,7 @@ class ConfigureBootloader(Operation):
elif self.getarch() == "ia64":
tp = "elilo"
else:
tp = "grub"
tp = "grub2"
# FIXME if tag file format is error?
if os.path.isfile("/tag"):
fd = open("/tag","r")
@@ -355,12 +355,13 @@ class ConfigureBootloader(Operation):
list = string.split('-')
fd.close()
bootloader=['-t',tp,'-o',list[0][5:].split('.')[0]+'.'+list[0][5:].split('.')[1],'-k','"linx_serial=%s vga=791 quiet"' %ri_data.SerialNumber.value.strip()]
#bootloader=['-t',tp,'-o',list[0][5:].split('.')[0]+'.'+list[0][5:].split('.')[1],'-k','"linx_serial=%s vga=791 quiet"' %ri_data.SerialNumber.value.strip()]
bootloader=['-t',tp,'-k','"linx_serial=%s vga=791"' %ri_data.SerialNumber.value.strip()]
for k in Mount.dict.keys():
if '/' == Mount.dict[k]:
bootloader += ['-r',k]
if '/boot' == Mount.dict[k]:
bootloader += ['-b',k]
#for k in Mount.dict.keys():
# if '/' == Mount.dict[k]:
# bootloader += ['-r',k]
# if '/boot' == Mount.dict[k]:
# bootloader += ['-b',k]
return bootloader