modified: interface/ri_data.py
modified: interface/ri_func_dep.py modified: interface/ri_inst_cli.py modified: interface/ri_inst_tk.py modified: interface/ri_oper.py modified: xml/interface.xml make tab equal 4 spaces
This commit is contained in:
@@ -160,7 +160,7 @@ class Mount(Operation):
|
||||
# dict saved only device and mount point
|
||||
dict={}
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self, 'Mount partition', u'挂载分区', 'mount_partition.sh',scr)
|
||||
Operation.__init__(self,'Mount partition', u'挂载分区', 'mount_partition.sh',scr)
|
||||
|
||||
def get_stdin(self):
|
||||
mount=''
|
||||
@@ -215,12 +215,12 @@ class GenerateIssue(Operation):
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'Generate /etc/issue',u'生成/etc/issue文件','generate_issue.sh',scr)
|
||||
|
||||
def get_arguments(self):
|
||||
def get_arguments(self):
|
||||
args=[]
|
||||
# FIXME if tag file format is error?
|
||||
if os.path.isfile("/tag"):
|
||||
fd=open("/tag","r")
|
||||
string = fd.read()
|
||||
fd=open("/tag","r")
|
||||
string = fd.read()
|
||||
list = string.split('\n')[0].split('-')
|
||||
args = ['-v']+[list[0][5:]]+["-a"]+[list[1]]+["-r"]+[list[2]]+['-d']+['-'.join(list[3:])]
|
||||
fd.close()
|
||||
@@ -256,11 +256,11 @@ class ConfigureNetwork(Operation):
|
||||
network+="-s %s "%data.secondary_dns
|
||||
else:
|
||||
network+="-t dynamic "
|
||||
if data.hostname is not '':
|
||||
if data.hostname:
|
||||
network+="-h %s "%data.hostname
|
||||
return [network]
|
||||
|
||||
class MakeServiceAutoBoot(Operation):
|
||||
class MakeServiceAutoBoot(Operation):
|
||||
"""class for make service autoboot"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Make service autoboot",u"启动服务器","mk_serv_autoboot.sh",scr)
|
||||
@@ -319,7 +319,7 @@ class ConfigureBootloader(Operation):
|
||||
string = fd.read()
|
||||
list = string.split('-')
|
||||
fd.close()
|
||||
|
||||
|
||||
bootloader=['-t',tp,'-o',list[0][5:].split('.')[0]+'.'+list[0][5:].split('.')[1],'-k','vga=791 linx_serial=%s' %ri_data.SerialNumber.value.strip()]
|
||||
|
||||
for k in Mount.dict.keys():
|
||||
|
||||
Reference in New Issue
Block a user