Merge branch 'tmp'
This commit is contained in:
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
from xml.dom import minidom
|
||||
import Tkinter
|
||||
|
||||
def attr_to_dict(attr):
|
||||
''' convert (widget or grid_location) attributes into a dict '''
|
||||
dict = {}
|
||||
for a in attr.values():
|
||||
if a.name == 'image':
|
||||
dict[a.name] = Tkinter.PhotoImage(file=a.value)
|
||||
elif a.name == 'command':
|
||||
module = sys.modules[__name__]
|
||||
dict[a.name] = getattr(module, a.value)
|
||||
else:
|
||||
dict[a.name] = a.value
|
||||
return dict
|
||||
|
||||
def construct_widget_dict():
|
||||
''' Go through all widget xml nodes on first level, I mean, those widgets defined
|
||||
inside other widget will not be checked. If the widget has a name, it will
|
||||
be recorded in the widget_dict.'''
|
||||
widgets = [e for e in xmldoc.firstChild.childNodes
|
||||
if e.nodeType == e.ELEMENT_NODE and e.nodeName == "widget"]
|
||||
for w in widgets:
|
||||
if "name" in w.attributes.keys():
|
||||
widget_dict[w.attributes["name"].value] = w
|
||||
|
||||
def widget(w_xml, p_win):
|
||||
''' create a widget.
|
||||
w_xml is a xml node describing the widget.
|
||||
p_win is the parent widget.'''
|
||||
func = getattr(Tkinter, w_xml.attributes["type"].value)
|
||||
# convert attributes into dictionary
|
||||
wa_list = [wa for wa in w_xml.childNodes
|
||||
if wa.nodeType == wa.ELEMENT_NODE and wa.nodeName =="widget_attribute"]
|
||||
if wa_list:
|
||||
# only process the first element, and there should be only one element.
|
||||
attr_dict = attr_to_dict(wa_list[0].attributes)
|
||||
w_win = func(p_win, attr_dict)
|
||||
else:
|
||||
w_win = func(p_win)
|
||||
|
||||
gm_list = [m for m in w_xml.childNodes
|
||||
if m.nodeType == m.ELEMENT_NODE and m.nodeName == "grid_management"]
|
||||
gl_list = [l for l in w_xml.childNodes
|
||||
if l.nodeType == l.ELEMENT_NODE and l.nodeName == "grid_location"]
|
||||
w_list = [ w for w in w_xml.childNodes
|
||||
if w.nodeType == w.ELEMENT_NODE and w.nodeName == "widget" ]
|
||||
|
||||
for w in w_list:
|
||||
widget(w, w_win)
|
||||
|
||||
for m in gm_list:
|
||||
for cf in m.childNodes:
|
||||
if cf.nodeType != m.ELEMENT_NODE or cf.nodeName != "configure":
|
||||
continue
|
||||
if "row" in cf.attributes.keys():
|
||||
cf_func = getattr(w_win, "rowconfigure")
|
||||
n = cf.attributes["row"].value
|
||||
elif "column" in cf.attributes.keys():
|
||||
cf_func = getattr(w_win, "columnconfigure")
|
||||
n = cf.attributes["column"].value
|
||||
else:
|
||||
continue
|
||||
cf_func(n, weight=cf.attributes["weight"].value)
|
||||
# only process the first item
|
||||
break
|
||||
|
||||
for l in gl_list:
|
||||
ld = attr_to_dict(l.attributes)
|
||||
w_win.grid(ld)
|
||||
# only process the first item
|
||||
break
|
||||
|
||||
def display():
|
||||
''' Display a series of widgets '''
|
||||
root_window = Tkinter.Tk()
|
||||
|
||||
# first display the main frame
|
||||
widget(widget_dict["main"], root_window)
|
||||
root_window.columnconfigure(0, weight=1)
|
||||
root_window.rowconfigure(0, weight=1)
|
||||
root_window.geometry('800x600+0+0')
|
||||
root_window.mainloop()
|
||||
|
||||
# commands for buttons
|
||||
def quit():
|
||||
print "quit"
|
||||
|
||||
def previous_step():
|
||||
print "previous step"
|
||||
|
||||
def next_step():
|
||||
|
||||
print "next step"
|
||||
|
||||
xmldoc = minidom.parse("../../xml/interface_t.xml")
|
||||
|
||||
widget_dict={}
|
||||
construct_widget_dict()
|
||||
|
||||
sequence_dict={}
|
||||
construct_sequence_dict()
|
||||
|
||||
display()
|
||||
@@ -10,7 +10,7 @@ install_xml = '../xml/install.xml'
|
||||
config_xml = '../xml/config.xml'
|
||||
|
||||
def to_xml_attr(doc, node, cls, name):
|
||||
''' This method is called by to_xml. Its function is to create an attribute, and set its value based on Network data member
|
||||
''' This method is called by to_xml. Its function is to create an attribute, and set its value based on xml data member
|
||||
doc - xml document
|
||||
node - xml node
|
||||
cls - python class/python instance
|
||||
@@ -55,7 +55,6 @@ class Partition:
|
||||
@staticmethod
|
||||
def init_from_os():
|
||||
''' create a Partition instance from hardware info'''
|
||||
device_list=[]
|
||||
Partition.unit='GB'
|
||||
cmd_cat = 'cat /proc/partitions'
|
||||
|
||||
@@ -82,7 +81,7 @@ class Partition:
|
||||
l = [ s.split()[-1] for s in o.splitlines() if re.match(r'\s*\d+', s)]
|
||||
# devices : 1) sda, sdb(first if ), or md0 (second if)
|
||||
for d in [ i for i in l if not re.search(r'\d+', i)
|
||||
or re.search(r'([a-zA-Z]+)', i).group(1) not in l]
|
||||
or re.search(r'([a-zA-Z]+)', i).group(1) not in l]:
|
||||
st,o=commands.getstatusoutput('parted /dev/%s unit %s print'%(d,Partition.unit))
|
||||
if st:
|
||||
print "Error parted execute error"
|
||||
@@ -114,14 +113,14 @@ class Partition:
|
||||
flg_i= s.find('Flags')
|
||||
if tp_i < 0: tp_i=fs_i
|
||||
located = True
|
||||
|
||||
if located:
|
||||
elif located:
|
||||
Partition(d+s[nm_i:st_i].strip(), # device name
|
||||
s[st_i:end_i].strip(), # start
|
||||
s[st_i:end_i].strip().rstrip(Partition.unit), # start
|
||||
s[sz_i:tp_i].strip().rstrip(Partition.unit), # size
|
||||
s[tp_i:fs_i].strip(), # type
|
||||
re.search('swap', s[fs_i:flg_i]) and 'swap' or s[fs_i:flg_i].strip(), # file system
|
||||
s[flg_i:].strip() # flags
|
||||
s[flg_i:].strip(), # flags
|
||||
'yes'
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
@@ -148,7 +147,8 @@ p_node - xml node (parent node)'''
|
||||
unit_attr = doc.createAttribute('unit')
|
||||
unit_attr.value = Partition.unit
|
||||
pts.setAttributeNode(unit_attr)
|
||||
for p in Partition.list:
|
||||
for k in Partition.dict.keys().sort():
|
||||
p = Partition.dict[k]
|
||||
pt = doc.createElement('partition')
|
||||
dev_attr = doc.createAttribute('device')
|
||||
start_attr = doc.createAttribute('start')
|
||||
@@ -173,10 +173,13 @@ p_node - xml node (parent node)'''
|
||||
pt.setAttributeNode(from_attr)
|
||||
pts.appendChild(pt)
|
||||
p_node.appendChild(pts)
|
||||
# ri_tk_cmd.py use
|
||||
|
||||
@staticmethod
|
||||
def get_size(dev):
|
||||
return Partition.dict[dev].size
|
||||
try:
|
||||
return Partition.dict[dev].size
|
||||
except:
|
||||
return None
|
||||
|
||||
class Raid:
|
||||
''' raid information '''
|
||||
@@ -252,7 +255,8 @@ l - list
|
||||
doc - xml document instance
|
||||
p_node - xml node (parent node) '''
|
||||
raids = doc.createElement('raids')
|
||||
for r in Raid.list:
|
||||
for k in Raid.dict.keys().sort():
|
||||
r = Raid.dict[k]
|
||||
rd = doc.createElement('raid')
|
||||
|
||||
rd_dev_attr = doc.createAttribute('device')
|
||||
@@ -289,8 +293,12 @@ p_node - xml node (parent node) '''
|
||||
#ri_tk_cmd.py use
|
||||
@staticmethod
|
||||
def get_size(dev):
|
||||
# need fill
|
||||
pass
|
||||
''' calculate raid device size '''
|
||||
rd = Raid.dict[dev]
|
||||
sz = min([ float(Partition.dict[d].size) for d in rd.active_components])
|
||||
if rd.level == '0': return sz*len(rd.active_components)
|
||||
elif rd.level == '1': return sz*len(rd.active_components)/2
|
||||
elif rd.level == '5': return sz*(len(rd.active_components)-1)
|
||||
|
||||
@staticmethod
|
||||
def get_next_device():
|
||||
@@ -306,7 +314,7 @@ p_node - xml node (parent node) '''
|
||||
def dev_in_raid():
|
||||
"""if the device in raid or not"""
|
||||
devices_in_raid=set()
|
||||
for r in Raid.list:
|
||||
for r in Raid.dict.values():
|
||||
devices_in_raid.update(r.active_components)
|
||||
devices_in_raid.update(r.spare_components)
|
||||
return devices_in_raid
|
||||
@@ -339,13 +347,13 @@ class MountPoint:
|
||||
MountPoint(dev, fs=Partition.dict[dev].filesystem)
|
||||
|
||||
for dev in Raid.dict.keys():
|
||||
if MountPoint.dict.has_key(dev)
|
||||
continue
|
||||
if MountPoint.dict.has_key(dev): continue
|
||||
MountPoint(dev)
|
||||
|
||||
# now process whether a partition or raid was removed
|
||||
# now delete unexist partition/raid mount point, or
|
||||
# partition that used in raid.
|
||||
s1 = set(MountPoint.dict.keys())
|
||||
s2 = set(Partition.dict.keys() + Raid.dict.keys())
|
||||
s2 = set(Partition.dict.keys() + Raid.dict.keys()) - set(dev_in_raid)
|
||||
for dev in s1-s2:
|
||||
del MountPoint.dict[dev]
|
||||
|
||||
@@ -366,7 +374,8 @@ class MountPoint:
|
||||
doc - xml document instance
|
||||
p_node - xml node (parent node)'''
|
||||
mps = doc.createElement('mount-points')
|
||||
for m in MountPoint.list:
|
||||
for k in MountPoint.dict.keys().sort():
|
||||
m = MountPoint.dict[k]
|
||||
mp = doc.createElement('mount-point')
|
||||
dev_attr = doc.createAttribute('device')
|
||||
dir_attr = doc.createAttribute('directory')
|
||||
@@ -383,6 +392,14 @@ p_node - xml node (parent node)'''
|
||||
mps.appendChild(mp)
|
||||
p_node.appendChild(mps)
|
||||
|
||||
@staticmethod
|
||||
def get_size(dev):
|
||||
'''get size of this mount point '''
|
||||
if dev in Partition.dict.keys():
|
||||
return Partition.get_size(dev)
|
||||
elif dev in Raid.dict.keys():
|
||||
return Raid.get_size(dev)
|
||||
|
||||
class Network:
|
||||
''' network '''
|
||||
hostname =''
|
||||
@@ -527,6 +544,20 @@ p_node - xml node (parent node)'''
|
||||
grp.appendChild(optl)
|
||||
grps.appendChild(grp)
|
||||
p_node.appendChild(grps)
|
||||
@staticmethod
|
||||
def get_install_pkgs():
|
||||
''' get package names that should be installed '''
|
||||
l = []
|
||||
for g in Group.dict.values():
|
||||
if g.install != 'no':
|
||||
l.extend([ p for p in g.mandatory ])
|
||||
if g.selection == 'manual':
|
||||
l.extend([ p[0] for p in g.optional if p[1] == 'yes' ])
|
||||
elif g.selection == 'all':
|
||||
l.extend([ p[0] for p in g.optional ])
|
||||
else: # selection is 'none'
|
||||
pass
|
||||
return l
|
||||
|
||||
class Service:
|
||||
''' service '''
|
||||
@@ -564,16 +595,7 @@ p - pkg, that includes this service
|
||||
def change_state():
|
||||
''' Based on package information in Group class, change 'start' data member
|
||||
from 'disable' to 'no', or from 'yes'/'no' to 'disable' '''
|
||||
l = []
|
||||
for g in Group.dict.values():
|
||||
if g.install == 'mandatory' or g.install == 'yes':
|
||||
l.extend(g.mandatory)
|
||||
if g.selection == 'all':
|
||||
l.extend([ n for n, i in g.optional])
|
||||
elif g.selection == 'manual':
|
||||
l.extend([ n for n, i in g.optional if i == 'yes'])
|
||||
else: # selection is 'none'
|
||||
pass
|
||||
l = Group.get_install_pkgs()
|
||||
|
||||
for s in Service.list:
|
||||
if s.package in l:
|
||||
|
||||
@@ -62,16 +62,7 @@ def construct_depended():
|
||||
Depended.dict[dep].depended_by.add(d.name)
|
||||
|
||||
def get_extra_depending(pkg_list = []):
|
||||
l = []
|
||||
for g in ri_data.Group.dict.values():
|
||||
if g.install != 'no':
|
||||
l.extend([ p for p in g.mandatory ])
|
||||
if g.selection == 'manual':
|
||||
l.extend([ p[0] for p in g.optional if p[1] == 'yes' ])
|
||||
else:
|
||||
l.extend([ p[0] for p in g.optional ])
|
||||
|
||||
l = l + pkg_list
|
||||
l = ri_data.Group.get_install_pkgs() + pkg_list
|
||||
|
||||
set1 = set(l)
|
||||
set2 = set(set1)
|
||||
@@ -79,9 +70,12 @@ def get_extra_depending(pkg_list = []):
|
||||
for d in set1:
|
||||
set2.update(Depending.dict[d].depending)
|
||||
|
||||
global extra_pkgs
|
||||
extra_pkgs = set2.difference(set1)
|
||||
res = {}
|
||||
for d in set2.difference(set1):
|
||||
for d in extra_pkgs:
|
||||
res[d] = Depended.dict[d].depended_by.intersection(set1)
|
||||
|
||||
return res
|
||||
|
||||
extra_pkgs = []
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
import ri_data
|
||||
|
||||
class Pkg():
|
||||
pkg_list = []
|
||||
list = []
|
||||
|
||||
@staticmethod
|
||||
def set_pkg_list ():
|
||||
def set_list ():
|
||||
for i in ri_data.Group.dict.values():
|
||||
if i.install != 'no':
|
||||
Pkg.pkg_list += i.mandatory
|
||||
Pkg.list += i.mandatory
|
||||
if i.selection == 'all':
|
||||
Pkg.pkg_list += [ j[0] for j in i.optional ]
|
||||
Pkg.list += [ j[0] for j in i.optional ]
|
||||
else:
|
||||
Pkg.pkg_list += [ j[0] for j in i.optional if j[1] == 'yes' ]
|
||||
Pkg.list += [ j[0] for j in i.optional if j[1] == 'yes' ]
|
||||
|
||||
class FsType():
|
||||
mp_fstype_list = []
|
||||
list = []
|
||||
|
||||
@staticmethod
|
||||
def set_mp_fstype_list ():
|
||||
def set_list ():
|
||||
for fs in ri_data.MountPoint.list:
|
||||
FsType.mp_fstype_list.append(fs.filesystem)
|
||||
FsType.list.append(fs.filesystem)
|
||||
|
||||
class FunctionDepending:
|
||||
class FunctionDepending():
|
||||
list = []
|
||||
def __init__(self, pkg):
|
||||
self.package = pkg
|
||||
@@ -37,13 +37,13 @@ class FunctionDepending:
|
||||
|
||||
|
||||
class FileSystem(FunctionDepending):
|
||||
mp_fstype_list = []
|
||||
list = []
|
||||
def __init__(self, fs_type, fs_pkg):
|
||||
self.filesystem_type = fs_type
|
||||
FunctionDepending.__init__(self, fs_pkg)
|
||||
|
||||
def check(self):
|
||||
if self.filesystem_type in FsType.mp_fstype_list and self.package not in Pkg.pkg_list:
|
||||
if self.filesystem_type in FsType.list and self.package not in Pkg.list:
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -56,7 +56,7 @@ class DHCP(FunctionDepending):
|
||||
FunctionDepending.__init__(self, 'dhcpcd')
|
||||
|
||||
def check(self):
|
||||
if ri_data.Network.configuration == 'dynamic' and 'dhcpcd' not in Pkg.pkg_list:
|
||||
if ri_data.Network.configuration == 'dynamic' and 'dhcpcd' not in Pkg.list:
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -68,7 +68,7 @@ class RAID(FunctionDepending):
|
||||
FunctionDepending.__init__(self, 'mdadm')
|
||||
|
||||
def check(self):
|
||||
if 'mdadm' not in Pkg.pkg_list:
|
||||
if 'mdadm' not in Pkg.list:
|
||||
for i in ri_data.Raid.list:
|
||||
if i.from_os == 'no':
|
||||
return False
|
||||
@@ -79,8 +79,8 @@ class RAID(FunctionDepending):
|
||||
|
||||
def check_function_depending():
|
||||
|
||||
Pkg.set_pkg_list()
|
||||
FsType.set_mp_fstype_list()
|
||||
Pkg.set_list()
|
||||
FsType.set_list()
|
||||
func_dep_dict = {}
|
||||
|
||||
FileSystem("xfs", "xfsprogs")
|
||||
@@ -96,5 +96,4 @@ def check_function_depending():
|
||||
func_dep_dict.update(tmp)
|
||||
return func_dep_dict
|
||||
|
||||
#check_function_depending()
|
||||
|
||||
|
||||
@@ -66,34 +66,30 @@ lab_progress_bar=Label(root,text='%s:'%(language=="chinese" and u"进度" \
|
||||
lab_operation=Label(root,text="")
|
||||
lab_linx=Label(root,text="Linx")
|
||||
|
||||
txt_suboperation=Text(root,width=70,height=10)
|
||||
txt_suboperation=Text(root,width=100,height=10)
|
||||
|
||||
#operation lable and taskname
|
||||
lab_task.grid (row=1, column=0, sticky='SEW')
|
||||
lab_operation.grid (row=1, column=1, columnspan=2,sticky="S")
|
||||
txt_suboperation.grid(row=2, column=1,columnspan=2)
|
||||
lab_progress_bar.grid(row=3, column=0, sticky='NEW')
|
||||
lab_linx.grid (row=4, column=1, sticky='E')
|
||||
lab_task.grid (row=1, column=0, sticky='E')
|
||||
lab_operation.grid (row=1, column=1, sticky='')
|
||||
txt_suboperation.grid(row=2, column=1)
|
||||
lab_progress_bar.grid(row=3, column=0)
|
||||
lab_linx.grid (row=4, column=1, sticky='')
|
||||
|
||||
#logo
|
||||
photo_bm = PhotoImage(file="%s/../data/linxlogo.gif"\
|
||||
%os.path.split(os.path.realpath(__file__))[0])
|
||||
logo_label=Label(root,image=photo_bm)
|
||||
logo_label.grid(row=0,column=0,padx=50,pady=50,sticky='NW')
|
||||
logo_label.grid(row=0,column=0,padx=50, pady=50, sticky='NW')
|
||||
|
||||
#progress bar
|
||||
scl_progress=Scale(root,orient=HORIZONTAL,resolution=0.01,digits=4,from_=0,to=100,variable=stringvar_bar,label='%')
|
||||
scl_progress.grid(row=3,column=1,columnspan=2,sticky='NEW')
|
||||
scl_progress.grid(row=3,column=1,padx=50, sticky='NEW')
|
||||
|
||||
#root
|
||||
root.rowconfigure(0,weight=1)
|
||||
root.rowconfigure(1,weight=1)
|
||||
root.rowconfigure(2,weight=1)
|
||||
root.rowconfigure(3,weight=1)
|
||||
root.rowconfigure(4,weight=1)
|
||||
root.columnconfigure(0,weight=1)
|
||||
root.columnconfigure(1,weight=1)
|
||||
root.columnconfigure(2,weight=1)
|
||||
root.columnconfigure(3,weight=1)
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# SCRIPT NAME: ri_oper.py
|
||||
#
|
||||
# MENTOR: Li zhi
|
||||
# MENTOR: Li Zhi
|
||||
#
|
||||
# AUTHOR: Ling Fen
|
||||
#
|
||||
@@ -17,292 +17,310 @@
|
||||
# Ling Fen 2010-09-04 create
|
||||
|
||||
import ri_data
|
||||
import ri_dep
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
if os.path.isfile("../xml/install.xml"):
|
||||
ri_data.init_from_xml()
|
||||
|
||||
display_operation = None
|
||||
display_sub_operation = None
|
||||
display_scale = None
|
||||
language = 'english'
|
||||
|
||||
class Rate:
|
||||
''' class for installing progress, value is from 0 to 100'''
|
||||
value = 0
|
||||
@staticmethod
|
||||
def increase(n, max=100):
|
||||
if Rate.value+n <= max:
|
||||
Rate.value += n
|
||||
@staticmethod
|
||||
def set(n):
|
||||
Rate.value = n
|
||||
''' class for installing progress, value is from 0 to 100'''
|
||||
value = 0
|
||||
@staticmethod
|
||||
def increase(n, max=100):
|
||||
if Rate.value+n <= max:
|
||||
Rate.value += n
|
||||
@staticmethod
|
||||
def set(n):
|
||||
Rate.value = n
|
||||
|
||||
class Operation:
|
||||
''' This is a common base class for all install operations.
|
||||
The instances of its derived class should have the following
|
||||
data members:
|
||||
''' This is a common base class for all install operations.
|
||||
The instances of its derived class should have the following
|
||||
data members:
|
||||
chinese_name - operation name
|
||||
english_name - operation name
|
||||
script - shell script name
|
||||
return_value - shell script return value
|
||||
score - an abstract value, for example score is 5,
|
||||
steps - the subprocess of the number of runs
|
||||
step - the subprocess run one time
|
||||
total is 100, if this operations is completed, 5% work is done.
|
||||
steps - the subprocess of the number of runs
|
||||
current_step - the subprocess run one time
|
||||
total is 100, if this operations is completed, 5% work is done.
|
||||
|
||||
and the following methods:
|
||||
get_arguments - prepare arguments for scipt
|
||||
and the following methods:
|
||||
get_arguments - prepare arguments for script
|
||||
get_stdin - prepare stdin for script
|
||||
install - install progress '''
|
||||
install - install progress '''
|
||||
|
||||
def __init__(self,e,c,s,scr):
|
||||
''' Operation(base class) init method
|
||||
return_value is a dict, key is return code, value is a tuple, first
|
||||
element is English, second element is Chinese.'''
|
||||
self.return_value = {0:('success', u'成功'), \
|
||||
1:('argument error',u'参数错误'), \
|
||||
2:('deivce node do not exist',u'设备节点不存在'),\
|
||||
3:('filesystem no implement',u'文件系统没有实现'),\
|
||||
}
|
||||
self.english_name = e
|
||||
self.chinese_name = c
|
||||
self.script = s
|
||||
self.score = scr
|
||||
self.steps = 1
|
||||
self.step = 0
|
||||
def __init__(self,e,c,s,scr):
|
||||
''' Operation(base class) init method
|
||||
return_value is a dict, key is return code, value is a tuple, first
|
||||
element is English, second element is Chinese.'''
|
||||
self.return_value = {0:('Success', u'成功'), \
|
||||
1:('Argument error',u'参数错误'), \
|
||||
2:("Deivce node doesn't exist",u"设备节点不存在"),\
|
||||
3:("File system hasn't been implemented",u'文件系统没有实现'),\
|
||||
}
|
||||
self.english_name = e
|
||||
self.chinese_name = c
|
||||
self.script = s
|
||||
self.score = scr
|
||||
self.steps = 1
|
||||
self.current_step = 0
|
||||
|
||||
def install(self):
|
||||
if display_operation:
|
||||
display_operation(language == 'chinese' and self.chinese_name or self.english_name)
|
||||
def install(self):
|
||||
if display_operation:
|
||||
display_operation(language == 'chinese' and self.chinese_name or self.english_name)
|
||||
|
||||
max = Rate.value+self.score <100 and Rate.value+self.score or 100
|
||||
process = subprocess.Popen("./%s " %self.script + ' '.join(self.get_arguments()),\
|
||||
stdin=subprocess.PIPE,stdout=subprocess.PIPE, shell=True, \
|
||||
cwd="%s/../operation"%os.path.split(os.path.realpath(__file__))[0])
|
||||
process.stdin.write(self.get_stdin())
|
||||
process.stdin.close()
|
||||
while True:
|
||||
line = process.stdout.readline()
|
||||
if not line:
|
||||
break
|
||||
if line[0] == '@' and self.step < self.steps:
|
||||
self.step += 1
|
||||
if display_sub_operation:
|
||||
display_sub_operation(line[1:])
|
||||
Rate.increase(float(self.score)/self.steps, max)
|
||||
if display_scale: display_scale()
|
||||
ret = process.wait()
|
||||
Rate.set(max)
|
||||
if display_scale: display_scale()
|
||||
return ret
|
||||
max = Rate.value+self.score <100 and Rate.value+self.score or 100
|
||||
process = subprocess.Popen("./%s " %self.script + ' '.join(self.get_arguments()),\
|
||||
stdin=subprocess.PIPE,stdout=subprocess.PIPE, shell=True, \
|
||||
cwd="%s/../operation" %os.path.split(os.path.realpath(__file__))[0])
|
||||
process.stdin.write(self.get_stdin())
|
||||
process.stdin.close()
|
||||
while True:
|
||||
line = process.stdout.readline()
|
||||
if not line:
|
||||
break
|
||||
if line[0] == '@' and self.current_step < self.steps:
|
||||
self.current_step += 1
|
||||
if display_sub_operation:
|
||||
display_sub_operation(line[1:])
|
||||
Rate.increase(float(self.score)/self.steps, max)
|
||||
if display_scale: display_scale()
|
||||
ret = process.wait()
|
||||
Rate.set(max)
|
||||
if display_scale: display_scale()
|
||||
return ret
|
||||
|
||||
def get_arguments(self):
|
||||
return []
|
||||
def get_stdin(self):
|
||||
return ''
|
||||
def get_arguments(self):
|
||||
return []
|
||||
def get_stdin(self):
|
||||
return ''
|
||||
|
||||
class Format(Operation):
|
||||
''' class for format partition '''
|
||||
def __init__(self, scr):
|
||||
Operation.__init__(self, 'format partition', u'格式化分区', 'format_partition.sh', scr)
|
||||
self.return_value[127] = ('format partition utils not found', u'没有格式化硬盘功能')
|
||||
''' class for format partition '''
|
||||
def __init__(self, scr):
|
||||
Operation.__init__(self, 'Format partition', u'格式化分区', 'format_partition.sh', scr)
|
||||
self.return_value[127] = ('No tool to format partitions', u'没有格式化硬盘分区的工具')
|
||||
|
||||
def get_stdin(self):
|
||||
format=''
|
||||
n = 0
|
||||
for instance in ri_data.MountPoint.list:
|
||||
if instance.format == "yes" and instance.filesystem != '':
|
||||
format+="/dev/%s %s\n"%(instance.device,instance.filesystem)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return format
|
||||
def get_stdin(self):
|
||||
format=''
|
||||
n = 0
|
||||
for instance in ri_data.MountPoint.dict.values():
|
||||
if instance.format == "yes" and instance.filesystem != '':
|
||||
format+="/dev/%s %s\n"%(instance.device,instance.filesystem)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return format
|
||||
|
||||
class MakeRaid(Operation):
|
||||
"""class for make raid"""
|
||||
flag=False
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"make RAID",u"正在制作RAID磁盘阵列","mkraid_wrapper.sh",scr)
|
||||
def get_stdin(self):
|
||||
args = ''
|
||||
n = 0
|
||||
for instance in ri_data.Raid.list:
|
||||
if instance.from_os == 'no':
|
||||
MakeRaid.flag=True
|
||||
args += '-n /dev/%s -l %s -s %s -a %s\n' %(instance.device, instance.level, \
|
||||
','.join([ '/dev/%s' %sp for sp in instance.spare_components]), \
|
||||
','.join([ '/dev/%s' %ac for ac in instance.active_components]))
|
||||
n += 1
|
||||
self.steps += n
|
||||
return args
|
||||
"""class for make raid"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Making a RAID", u"正在制作RAID磁盘阵列", "mkraid_wrapper.sh", scr)
|
||||
def get_stdin(self):
|
||||
args = ''
|
||||
n = 0
|
||||
for instance in ri_data.Raid.dict.values():
|
||||
if instance.from_os == 'no':
|
||||
args += '-n /dev/%s -l %s -s %s -a %s\n' %(instance.device, instance.level, \
|
||||
','.join([ '/dev/%s' %sp for sp in instance.spare_components]), \
|
||||
','.join([ '/dev/%s' %ac for ac in instance.active_components]))
|
||||
n += 1
|
||||
self.steps += n
|
||||
return args
|
||||
|
||||
class MakeRaidConfigure(Operation):
|
||||
"""class for make raid configure"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"make raid configure file",u"配置raid配置文件","mkraidconf.sh",scr)
|
||||
def install(self):
|
||||
if MakeRaid.flag:
|
||||
Operation.install(self)
|
||||
else:
|
||||
max = Rate.value+self.score <100 and Rate.value+self.score or 100
|
||||
Rate.set(max)
|
||||
return 0
|
||||
"""class for make raid configure"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Generate /etc/mdadm.conf",u"生成raid配置文件","mkraidconf.sh",scr)
|
||||
def install(self):
|
||||
if ri_data.Raid.dict.values():
|
||||
return Operation.install(self)
|
||||
else:
|
||||
max = Rate.value+self.score <100 and Rate.value+self.score or 100
|
||||
Rate.set(max)
|
||||
return 0
|
||||
|
||||
def get_arguments(self):
|
||||
return ["/etc/mdadm.conf"]
|
||||
def get_arguments(self):
|
||||
return ["/etc/mdadm.conf"]
|
||||
|
||||
class Mount(Operation):
|
||||
"""class for mount partition"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'mount partition',u'挂载分区','mount_partition.sh',scr)
|
||||
self.return_value[2]=("device node doesn't exist",u"设备结点不存在")
|
||||
"""class for mount partition"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self, 'Mount partition', u'挂载分区', 'mount_partition.sh',scr)
|
||||
|
||||
def get_stdin(self):
|
||||
mount=''
|
||||
n = 0
|
||||
for instance in ri_data.MountPoint.list:
|
||||
if instance.directory != '' and instance.filesystem !='':
|
||||
mount+="/dev/%s %s %s\n"%(instance.device,instance.directory,instance.filesystem)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return mount
|
||||
def get_stdin(self):
|
||||
mount=''
|
||||
n = 0
|
||||
for instance in ri_data.MountPoint.dict.values():
|
||||
if instance.directory != '' and instance.filesystem !='':
|
||||
mount+="/dev/%s %s %s\n"%(instance.device,instance.directory,instance.filesystem)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return mount
|
||||
|
||||
class InstallPkg(Operation):
|
||||
"""class for install packages"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'install packages',u'安装软件包','install_pkg.sh',scr)
|
||||
self.return_value[2]=("source directory pkg_source_dir doesn't exist",u"软件包所在目录不存在")
|
||||
self.return_value[3]=("package in source doesn't exist",u"软件包不存在")
|
||||
|
||||
def get_stdin(self):
|
||||
pkgname=[]
|
||||
for i in ri_data.Group.dict.values():
|
||||
if i.install=='no':
|
||||
continue
|
||||
else:
|
||||
pkgname+=i.mandatory
|
||||
if i.selection=='all':
|
||||
pkgname += [ j[0] for j in i.optional ]
|
||||
else:
|
||||
pkgname += [ j[0] for j in i.optional if j[1] == 'yes' ]
|
||||
"""class for install packages"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'Install packages',u'安装软件包','install_pkg.sh',scr)
|
||||
self.return_value[2]=("Software source directory doesn't exist",u"软件包所在目录不存在")
|
||||
self.return_value[3]=("Software package doesn't exist",u"软件包不存在")
|
||||
|
||||
self.steps += len(pkgname)
|
||||
return '\n'.join(pkgname)
|
||||
|
||||
def get_arguments(self):
|
||||
return ["-s","/Rocky/packages"]
|
||||
def get_stdin(self):
|
||||
pkgname = ri_data.Group.get_install_pkgs() + ri_dep.extra_pkgs
|
||||
self.steps += len(pkgname)
|
||||
return '\n'.join(pkgname)
|
||||
|
||||
def get_arguments(self):
|
||||
return ["-s","/Rocky/packages"]
|
||||
|
||||
class ConfigureFstab(Mount):
|
||||
"""class for configure /etc/fstab"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'configure fstab',u'配置/etc/fstab文件','configure_fstab.sh',scr)
|
||||
self.return_value[2]=("fstab doesn't exist",u"/etc/fstab文件不存在")
|
||||
"""class for configure /etc/fstab"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'Configure /etc/fstab',u'配置/etc/fstab文件','configure_fstab.sh',scr)
|
||||
self.return_value[2]=("/etc/fstab doesn't exist",u"/etc/fstab文件不存在")
|
||||
|
||||
def get_stdin(self):
|
||||
fstab=''
|
||||
flag=True
|
||||
for d in MountPoint.dict.values():
|
||||
if d.filesystem != '' and d.directory !='':
|
||||
fstab += "/dev/%s %s %s\n" %(d.device, d.directory, d.filesystem)
|
||||
elif d.filesystem == 'swap' and flag:
|
||||
fstab += "/dev/%s swap swap\n" %d.device
|
||||
flag=False
|
||||
return fstab
|
||||
|
||||
class GenerateIssue(Operation):
|
||||
"""class for generate /etc/issue"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'generate issue',u'生成/etc/issue文件','generate_issue.sh',scr)
|
||||
"""class for generate /etc/issue"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'Generate /etc/issue',u'生成/etc/issue文件','generate_issue.sh',scr)
|
||||
|
||||
def get_arguments(self):
|
||||
args=[]
|
||||
# FIXME if tag file format is error?
|
||||
if os.path.isfile("/tag") :
|
||||
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:])]
|
||||
return args
|
||||
def get_arguments(self):
|
||||
args=[]
|
||||
# FIXME if tag file format is error?
|
||||
if os.path.isfile("/tag"):
|
||||
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()
|
||||
return args
|
||||
|
||||
class ConfigureNetwork(Operation):
|
||||
"""class for configure network"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'configure network',u'配置网络','configure_network.sh',scr)
|
||||
self.return_value[2]=("ip or netmask or geteway address incorrect",u"ip或子网掩码或网关不正确")
|
||||
self.return_value[3]=("hosts/resolv.conf/ifcfg-eth0/network doesn't exist",u"文件hosts、resolv.conf、ifcfg-eht0、network 不存在")
|
||||
"""class for configure network"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,'Configure network',u'配置网络','configure_network.sh',scr)
|
||||
self.return_value[2]=("Ip address, network, or geteway is incorrect",u"Ip地址、子网掩码、网关不正确")
|
||||
self.return_value[3]=("/etc/hosts, /etc/resolv.conf, /etc/sysconfig/network-devices/ifcfg.template, or /etc/sysconfig/network doesn't exist",\
|
||||
u"文件/etc/hosts,/etc/resolv.conf,/etc/sysconfig/network-devices/ifcfg.template或/etc/sysconfig/network文件不存在")
|
||||
|
||||
def get_arguments(self):
|
||||
network=''
|
||||
data=ri_data.Network
|
||||
if data.configuration == "static":
|
||||
network+="-t static "
|
||||
if data.hostname is not '':
|
||||
network+="-h %s "%data.hostname
|
||||
if data.domain is not '':
|
||||
network+="-d %s "%data.domain
|
||||
if data.ip is not '':
|
||||
network+="-i %s "%data.ip
|
||||
if data.mask is not '':
|
||||
network+="-n %s "%data.mask
|
||||
if data.gateway is not '':
|
||||
network+="-g %s "%data.gateway
|
||||
if data.primary_dns is not '':
|
||||
network+="-p %s "%data.primary_dns
|
||||
if data.secondary_dns is not '':
|
||||
network+="-s %s "%data.secondary_dns
|
||||
else:
|
||||
network+="-t dynamic "
|
||||
if data.hostname is not '':
|
||||
network+="-h %s "%data.hostname
|
||||
return [network]
|
||||
|
||||
|
||||
def get_arguments(self):
|
||||
network=''
|
||||
data=ri_data.Network
|
||||
if data.configuration == "static":
|
||||
network+="-t static "
|
||||
if data.hostname is not '':
|
||||
network+="-h %s "%data.hostname
|
||||
if data.domain is not '':
|
||||
network+="-d %s "%data.domain
|
||||
if data.ip is not '':
|
||||
network+="-i %s "%data.ip
|
||||
if data.mask is not '':
|
||||
network+="-n %s "%data.mask
|
||||
if data.gateway is not '':
|
||||
network+="-g %s "%data.gateway
|
||||
if data.primary_dns is not '':
|
||||
network+="-p %s "%data.primary_dns
|
||||
if data.secondary_dns is not '':
|
||||
network+="-s %s "%data.secondary_dns
|
||||
else:
|
||||
network+="-t dynamic "
|
||||
if data.hostname is not '':
|
||||
network+="-h %s "%data.hostname
|
||||
return [network]
|
||||
|
||||
class MakeServiceAutoBoot(Operation):
|
||||
"""class for make service autoboot"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"make service autoboot",u"启动服务器","mk_serv_autoboot.sh",scr)
|
||||
self.return_value[2]=("boot script doesn't exist",u"引导脚本不存在")
|
||||
"""class for make service autoboot"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Make service autoboot",u"启动服务器","mk_serv_autoboot.sh",scr)
|
||||
self.return_value[2]=("Boot script doesn't exist",u"引导脚本不存在")
|
||||
|
||||
def get_stdin(self):
|
||||
serv=''
|
||||
n = 0
|
||||
for i in ri_data.Service.list:
|
||||
if i.start == "yes":
|
||||
serv+='%s %s %s %s\n'%(i.package,i.script,i.name,i.number)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return serv
|
||||
|
||||
def get_stdin(self):
|
||||
serv=''
|
||||
n = 0
|
||||
for i in ri_data.Service.list:
|
||||
if i.start == "yes":
|
||||
serv+='%s %s %s %s\n'%(i.package,i.script,i.name,i.number)
|
||||
n += 1
|
||||
self.steps += n
|
||||
return serv
|
||||
|
||||
class CopyKernel(Operation):
|
||||
"""class for copy kernel"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"copy kernle",u"拷贝内核","copy_kernels.sh",scr)
|
||||
self.return_value[1]=("kernel directory/modules directory/initrd.gz/makeinitrd doesn't exist",u"内核目录、模块目录、initrd.gz、makeinitrd 不存在")
|
||||
"""class for copy kernel"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Copy kernle",u"拷贝内核","copy_kernels.sh",scr)
|
||||
self.return_value[1]=("kernel directory, modules directory, initrd.gz, or makeinitrd doesn't exist",u"内核目录、模块目录、initrd.gz文件、makeinitrd指令不存在")
|
||||
|
||||
class ExecFinishInstall(Operation):
|
||||
"""class for exec finish install"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"exec finish install",u"安装完成执行的脚本","exec_finish_install.sh",scr)
|
||||
def get_stdin(self):
|
||||
return "99finish_install.sh\n"
|
||||
|
||||
class BootLoader(Operation):
|
||||
"""class for bootloader"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"install bootloader",u"安装引导程序","install_bootloader.sh",scr)
|
||||
self.return_value[2]=("bootloader type doesn't specify",u"没有指定引导程序的类型")
|
||||
self.return_value[3]=("bootloader no implement",u"没有执行bootloader")
|
||||
self.return_value[127]=("bootloader utils not found",u"没发现bootloader的utils")
|
||||
"""class for exec finish install"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Exec finish_install script",u"安装完成执行的脚本","exec_finish_install.sh",scr)
|
||||
def get_stdin(self):
|
||||
return "99finish_install.sh\n"
|
||||
|
||||
def get_arguments(self):
|
||||
# only grub?
|
||||
return ["-t grub"]
|
||||
class BootLoader(Operation):
|
||||
"""class for bootloader"""
|
||||
def __init__(self,scr):
|
||||
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等")
|
||||
|
||||
def get_arguments(self):
|
||||
# only grub?
|
||||
return ["-t grub"]
|
||||
|
||||
class ConfigureBootloader(Operation):
|
||||
"""class for configure bootloader file"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"configure bootloader",u"配置bootloader","configure_bootloader_cnf.sh",scr)
|
||||
self.return_value[2]=("bootloader type doesn't specify",u"没有指定引导程序的类型")
|
||||
self.return_value[3]=("bootloader configure file doesn't exist",u"引导程序配置文件不存在")
|
||||
self.return_value[4]=("bootloader configuration file doesn't exist",u"引导程序配置文件不存在")
|
||||
"""class for configure bootloader file"""
|
||||
def __init__(self,scr):
|
||||
Operation.__init__(self,"Configure bootloader",u"配置bootloader","configure_bootloader_cnf.sh",scr)
|
||||
self.return_value[2]=("Bootloader type hasn't specified",u"没有指定引导程序的类型")
|
||||
self.return_value[3]=("Bootloader hasn't been implemented",u"没有实现bootloader")
|
||||
self.return_value[4]=("Bootloader configuration file doesn't exist",u"引导程序配置文件不存在")
|
||||
|
||||
def get_arguments(self):
|
||||
bootloader=[]
|
||||
# FIXME if tag file format is error?
|
||||
if os.path.isfile("/tag"):
|
||||
fd = open("/tag","r")
|
||||
string = fd.read()
|
||||
list = string.split('-')
|
||||
for instance in ri_data.MountPoint.list:
|
||||
if instance.directory == '/':
|
||||
# only grub?
|
||||
bootloader=['-t','grub','-r',instance.device,'-k',ri_data.SerialNumber.value,'-o',list[0][5:].split('.')[0]+'.'+list[0][5:].split('.')[1]]
|
||||
break
|
||||
return bootloader
|
||||
def get_arguments(self):
|
||||
list=[]
|
||||
tp="grub"
|
||||
isboot=False
|
||||
isroot=False
|
||||
# FIXME if tag file format is error?
|
||||
if os.path.isfile("/tag"):
|
||||
fd = open("/tag","r")
|
||||
string = fd.read()
|
||||
list = string.split('-')
|
||||
fd.close()
|
||||
|
||||
bootloader=['-t',tp,'-o',list[0][5:].split('.')[0]+'.'+list[0][5:].split('.')[1]]
|
||||
|
||||
for instance in ri_data.MountPoint.dict.values():
|
||||
if instance.directory == '/' and not isroot:
|
||||
bootloader+=['-r',instance.device]
|
||||
isroot=True
|
||||
continue
|
||||
if isroot and instance.directory == '/boot' and not isboot :
|
||||
bootloader+=['-b',instance.device]
|
||||
isboot=True
|
||||
continue
|
||||
|
||||
if ri_data.SerialNumber.value:
|
||||
bootloader+=['-k',"linx_serial=%s" %ri_data.SerialNumber.value]
|
||||
return bootloader
|
||||
|
||||
@@ -6,6 +6,7 @@ import tkMessageBox
|
||||
import sys
|
||||
import ri_cmd
|
||||
import ri_widget
|
||||
import os.path
|
||||
|
||||
var_dict={}
|
||||
# language should be all lower case letters
|
||||
@@ -55,8 +56,6 @@ def create_widget(w):
|
||||
set_step_info(w.name)
|
||||
set_help_info('#'+w.name+'.help')
|
||||
|
||||
import os.path
|
||||
|
||||
class MyImage:
|
||||
''' MyImage - a dummy class to hold Image variable '''
|
||||
count = 0
|
||||
@@ -97,6 +96,8 @@ def create_widget_sub(w, p_win):
|
||||
if not v_n in var_dict.keys():
|
||||
# if not yet in dict, create it
|
||||
var_dict[v_n] = getattr(Tkinter, v_t)(value=v_v)
|
||||
else:
|
||||
print 'error: variable(%s) already defined' %v_n
|
||||
|
||||
# change attr, if needed to suit tk
|
||||
tk_attr = dict(w.attr)
|
||||
@@ -217,7 +218,6 @@ class SoftwarePackageWindow():
|
||||
class member
|
||||
---------------------------
|
||||
dict - class static member
|
||||
---------------------------
|
||||
|
||||
instance member
|
||||
---------------------------
|
||||
@@ -343,6 +343,9 @@ class SoftwarePackageWindow():
|
||||
Tkinter.Button(win, text='OK', command=self.ok).grid(column=0, row=6, pady=2)
|
||||
Tkinter.Button(win, text='Cancel', command=self.cancel).grid(column=1, row=6, pady=2)
|
||||
|
||||
# bind WM_DELETE_WINDOW
|
||||
win.protocol("WM_DELETE_WINDOW", self.cancel)
|
||||
|
||||
win.after_idle(lambda : cnv1.configure(scrollregion=(0,0, fr1.winfo_width(), fr1.winfo_height())))
|
||||
win.after_idle(lambda : cnv2.configure(scrollregion=(0,0, fr2.winfo_width(), fr2.winfo_height())))
|
||||
|
||||
|
||||
@@ -22,9 +22,7 @@ def mount_list_init():
|
||||
ri_data.MountPoint.init_from_internal()
|
||||
for d in ri_data.MountPoint.dict.keys().sort():
|
||||
# get size from Partition info
|
||||
sz = ri_data.Partition.get_size(d)
|
||||
if not sz:
|
||||
sz = ri_data.Raid.get_size(d)
|
||||
sz = MountPoint.get_size(d)
|
||||
m = ri_data.MountPoint.dict[d]
|
||||
s = m.device.ljust(10) + m.directory.ljust(10) + m.filesystem.ljust(10) + m.format.ljust(4) + sz.ljust(6)
|
||||
l.append(s)
|
||||
@@ -41,15 +39,16 @@ def mp_top_init():
|
||||
idxs = ml_win.curselection()
|
||||
if len(idxs) == 1:
|
||||
idx = int(idxs[0])
|
||||
mp = ri_data.MountPoint.list[idx]
|
||||
dev = mp.device
|
||||
dir = mp.directory
|
||||
l = eval(display.var_dict['mount.list'].get())
|
||||
dev = l[idx].split()[0]
|
||||
mp = ri_data.MountPoint.dict[dev]
|
||||
dr = mp.directory
|
||||
fs = mp.filesystem
|
||||
fm = mp.format
|
||||
sz = mp.size
|
||||
sz = MountPoint.get_size(dev)
|
||||
display.var_dict['mp_top_dev'].set(value=dev)
|
||||
display.var_dict['mp_top_size'].set(value=sz)
|
||||
display.var_dict['mp_top_dir'].set(value=dir)
|
||||
display.var_dict['mp_top_dir'].set(value=dr)
|
||||
if fm == 'yes':
|
||||
ri_widget.Widget.dict['mp_top_format'].tk_widget.select()
|
||||
else:
|
||||
@@ -66,24 +65,24 @@ def mp_top_ok():
|
||||
for itm in eval(display.var_dict['mount.list'].get()):
|
||||
dev = itm.split()[0]
|
||||
dev2 = display.var_dict['mp_top_dev'].get()
|
||||
base_fs=''
|
||||
if dev == dev2:
|
||||
sz = display.var_dict['mp_top_size'].get()
|
||||
dir = display.var_dict['mp_top_dir'].get()
|
||||
dr = display.var_dict['mp_top_dir'].get()
|
||||
fm = display.var_dict['mp_top_format'].get()
|
||||
idxs2 = ri_widget.Widget.dict['mp_top_fs'].tk_widget.curselection()
|
||||
for m in ri_data.Partition.list:
|
||||
if m.device == dev2:
|
||||
base_fs = m.filesystem
|
||||
if len(idxs2) and fm =='yes' :
|
||||
idx2 = int(idxs2[0])
|
||||
fs = eval(display.var_dict['mp_top_fs'].get())[idx2]
|
||||
elif fm=='no':
|
||||
fs = base_fs
|
||||
s2 = dev.ljust(10) + dir.ljust(10) + fs.ljust(10) + fm.ljust(4) + sz.ljust(6)
|
||||
# if format, use the filesystem just set
|
||||
idx2 = int(idxs2[0])
|
||||
fs = eval(display.var_dict['mp_top_fs'].get())[idx2]
|
||||
elif dev in Partition.dict.keys():
|
||||
# else use the filesystem in Partition
|
||||
fs = Partition.dict[dev].filesystem
|
||||
else:
|
||||
fs = ' '
|
||||
s2 = dev.ljust(10) + dr.ljust(10) + fs.ljust(10) + fm.ljust(4) + sz.ljust(6) + ri_data.Partition.unit
|
||||
l.append(s2)
|
||||
# make change in internal data structure
|
||||
ri_data.MountPoint.change(dev2, dir, fs, fm)
|
||||
ri_data.MountPoint.change(dev, dir, fs, fm)
|
||||
else:
|
||||
l.append(itm)
|
||||
|
||||
@@ -133,12 +132,12 @@ class GroupButton(object):
|
||||
dict={}
|
||||
def __init__(self, g):
|
||||
self.name = g.name
|
||||
self.win = display.SoftwarePackageWindow(g)
|
||||
GroupButton.dict[g.name] = self
|
||||
display.SoftwarePackageWindow(g)
|
||||
|
||||
|
||||
def __call__(self):
|
||||
print self.name
|
||||
display.SoftwarePackageWindow.dict[self.name].show()
|
||||
self.win.show()
|
||||
|
||||
class GroupCheck(GroupButton):
|
||||
''' A function class called whenever the group check button is checked '''
|
||||
@@ -191,10 +190,8 @@ def software_group_optional_quit():
|
||||
''' software group window quit, record optional group state '''
|
||||
opt = [ o for o in ri_data.Group.dict.values() if o.install != 'mandatory' ]
|
||||
for i in opt:
|
||||
print i.name
|
||||
vn = "software_group_%s" %(i.name)
|
||||
i.install = display.var_dict[vn].get()
|
||||
print i.name, i.install
|
||||
|
||||
def dependency_list_init():
|
||||
''' init function for list in dependency step '''
|
||||
@@ -261,13 +258,10 @@ def raid_raw_init():
|
||||
if not raid_raw_initialized:
|
||||
raid_raw_initialized = True
|
||||
# get all component devices already in raid
|
||||
dev_in_raid = set()
|
||||
for r in ri_data.Raid.list:
|
||||
dev_in_raid.update(r.active_components)
|
||||
dev_in_raid.update(r.spare_components)
|
||||
dev_in_raid = ri_data.Raid.dev_in_raid()
|
||||
|
||||
raw_devs = [ p.device for p in ri_data.Partition.list
|
||||
if p.flags=='yes' and p.device not in dev_in_raid ]
|
||||
raw_devs = [ d for d in ri_data.Partition.dict.keys()
|
||||
if re.search('raid', ri_data.Partition.dict[d].flags) and d not in dev_in_raid ].sort()
|
||||
display.var_dict['raid_raw_devs'].set(value=tuple(raw_devs))
|
||||
|
||||
def list_to_list(list_from, var_from, var_to):
|
||||
@@ -284,7 +278,7 @@ def list_to_list(list_from, var_from, var_to):
|
||||
l_to = list(eval(display.var_dict[var_to].get()))
|
||||
l_to.append(itm)
|
||||
else:
|
||||
l_to = [ itm ]
|
||||
l_to = [ itm ].sort()
|
||||
display.var_dict[var_to].set(value=tuple(l_to))
|
||||
|
||||
def raid_raw_to_active():
|
||||
@@ -305,49 +299,35 @@ def raid_spare_to_raw():
|
||||
|
||||
def raid_device_init():
|
||||
''' initialize raid device list '''
|
||||
raid_devs = [ r.device for r in ri_data.Raid.list ]
|
||||
raid_devs = [ k for k in ri_data.Raid.keys() ].sort()
|
||||
display.var_dict['raid_devs'].set(value=tuple(raid_devs))
|
||||
|
||||
def raid_calc_size(level, devs):
|
||||
''' calculate raid device size
|
||||
level - raid level (0/1/5)
|
||||
devs - raid component devices
|
||||
'''
|
||||
# all devs shall have same size.
|
||||
unit=ri_data.Partition.unit
|
||||
sz=99999999999
|
||||
for p in ri_data.Partition.list:
|
||||
if p.device in devs:
|
||||
if float(p.size[:-len(unit)])< float(sz):
|
||||
sz = float(p.size[:-len(unit)])
|
||||
if level == '0':
|
||||
sz=sz*len(devs)
|
||||
return "%d%s"%(sz,unit)
|
||||
elif level == '1':
|
||||
return "%d%s"%(sz,unit)
|
||||
elif level == '5':
|
||||
sz=sz*(len(devs)-1)
|
||||
return "%d%s"%(sz,unit)
|
||||
|
||||
def raid_device_add():
|
||||
''' add a new raid device '''
|
||||
if display.var_dict['raid_active_devs'].get()=='':
|
||||
ri_widget.MessageBox.dict["raid_add_active_warning"].show()
|
||||
return
|
||||
else:
|
||||
try:
|
||||
active = list(eval(display.var_dict['raid_active_devs'].get()))
|
||||
if display.var_dict['raid_spare_devs'].get()=='':
|
||||
spare=[]
|
||||
else:
|
||||
except:
|
||||
active = []
|
||||
|
||||
try:
|
||||
spare = list(eval(display.var_dict['raid_spare_devs'].get()))
|
||||
except:
|
||||
spare = []
|
||||
|
||||
level = display.var_dict['raid_level'].get()
|
||||
|
||||
if not active or not level:
|
||||
ri_widget.MessageBox.dict["raid_add_warning"].show()
|
||||
return
|
||||
elif int(level) < 2 and len(active) < 2:
|
||||
ri_widget.MessageBox.dict["raid_add_active_numbers"].show()
|
||||
return
|
||||
elif str(level) == "5" and len(active)<3:
|
||||
ri_widget.MessageBox.dict["raid_add_active_numbers_2"].show()
|
||||
return
|
||||
|
||||
dev = ri_data.Raid.get_next_device()
|
||||
ri_data.Raid(dev, "no", level, raid_calc_size(level, active), active, spare)
|
||||
ri_data.Raid(dev, "no", level, active, spare)
|
||||
raid_device_init()
|
||||
display.var_dict['raid_active_devs'].set(value='')
|
||||
display.var_dict['raid_spare_devs'].set(value='')
|
||||
@@ -361,25 +341,30 @@ def raid_device_delete():
|
||||
idxs = win_dev.curselection()
|
||||
if len(idxs) == 1:
|
||||
idx = int(idxs[0])
|
||||
r = ri_data.Raid.list[idx]
|
||||
try:
|
||||
l = eval(display.var_dict['raid_devs'].get())
|
||||
except:
|
||||
# a null string?
|
||||
return
|
||||
dev = l[idx].split()[0]
|
||||
r = ri_data.Raid.dict[dev]
|
||||
if r.from_os == 'yes':
|
||||
ri_widget.MessageBox.dict["raid_delete_warning"].show()
|
||||
return
|
||||
if display.var_dict['raid_active_devs'].get() == '':
|
||||
active=[]
|
||||
else:
|
||||
try:
|
||||
active = list(eval(display.var_dict['raid_active_devs'].get()))
|
||||
if display.var_dict['raid_spare_devs'].get()=='':
|
||||
spare=[]
|
||||
else:
|
||||
except:
|
||||
active=[]
|
||||
try:
|
||||
spare = list(eval(display.var_dict['raid_spare_devs'].get()))
|
||||
|
||||
except:
|
||||
spare=[]
|
||||
active.extend(r.active_components)
|
||||
spare.extend(r.spare_components)
|
||||
# do not touch level
|
||||
display.var_dict['raid_active_devs'].set(value=tuple(active))
|
||||
display.var_dict['raid_spare_devs'].set(value=tuple(spare))
|
||||
del ri_data.Raid.list[idx]
|
||||
del ri_data.Raid.dict[dev]
|
||||
raid_device_init()
|
||||
|
||||
def raid_device_list_detail(*args):
|
||||
@@ -388,16 +373,21 @@ def raid_device_list_detail(*args):
|
||||
idxs = win.curselection()
|
||||
if len(idxs) == 1:
|
||||
idx = int(idxs[0])
|
||||
r = ri_data.Raid.list[idx]
|
||||
try:
|
||||
l = eval(display.var_dict['raid_devs'].get())
|
||||
except:
|
||||
# a null string?
|
||||
return
|
||||
dev = l[idx].split()[0]
|
||||
r = ri_data.Raid.dict[dev]
|
||||
display.var_dict['raid_detail_active'].set(value='active: %s' %(str(r.active_components)))
|
||||
display.var_dict['raid_detail_spare'].set(value='spare: %s' %(str(r.spare_components)))
|
||||
display.var_dict['raid_detail_level'].set(value='level: %s' %(str(r.level)))
|
||||
|
||||
raid_raw_initialized = False
|
||||
|
||||
def prepar_installation_init():
|
||||
'''install information initialize'''
|
||||
ins_info = ri_data.prepar_installation()
|
||||
t= ri_widget.Widget.dict['prepar_installation.text'].tk_widget
|
||||
t.insert(1.0,ins_info)
|
||||
|
||||
raid_raw_initialized = False
|
||||
|
||||
@@ -65,7 +65,7 @@ Usage:
|
||||
配置fstab,configure_fstab.sh
|
||||
输入:
|
||||
stdin
|
||||
1)block devices:块设备,(swap则用by-id,其他都用by-uuid)
|
||||
1)block devices:块设备
|
||||
2)mount point:挂载点
|
||||
3)filesystem type:文件系统类型
|
||||
以下参数为可选参数,如果不指定,会有默认的配置,如果指定5)那么4)也需要指定,依次类推
|
||||
|
||||
@@ -726,7 +726,8 @@ row 4 | |
|
||||
<message_box name='previous' type='showinfo' title='install sequence' message='#first-step'/>
|
||||
<message_box name='raid_add_warning' type='showwarning' title='raid adding' message='#raid-add-warning'/>
|
||||
<message_box name='raid_delete_warning' type='showwarning' title='raid deleting' message='#raid-delete-warning'/>
|
||||
<message_box name='raid_add_active_warning' type='showwarning' title='active' message='#raid-add-active-warning'/>
|
||||
<message_box name='raid_add_active_numbers' type='showwarning' title='number' message='#raid-add-active-numbers'/>
|
||||
<message_box name='raid_add_active_2numbers' type='showwarning' title='number' message='#raid-add-active-2numbers'/>
|
||||
<!--
|
||||
column 0 column 1
|
||||
________________________________________________
|
||||
@@ -802,7 +803,7 @@ row 4 | |
|
||||
<widget type='Listbox' name='mp_top_fs'>
|
||||
<widget_attribute listvariable='mp_top_fs'/>
|
||||
<grid_location row='4' column='1' sticky='W'/>
|
||||
<variable name='mp_top_fs' type='StringVar' value='ext2 ext3 reiserfs xfs jfs'/>
|
||||
<variable name='mp_top_fs' type='StringVar' value='ext2 ext3 reiserfs xfs jfs swap'/>
|
||||
</widget>
|
||||
|
||||
<widget type='Button'>
|
||||
@@ -859,7 +860,7 @@ row 4 | |
|
||||
<English>
|
||||
There are two kinds of dependent relationships. Dependent Functions and Dependent Packages.
|
||||
Dependent Functions :To provide systems function of packages. the left column is the systematic functions, the right column provides function of packages.
|
||||
Dependent Packages : The current selection of the dependent packages on the missing package. The left column of the software package is dependent on the right of the software packages
|
||||
Dependent Packages : Current selection of the dependent packages on the missing package. The software package in the left column is depended by the software packages in the right column.
|
||||
|
||||
</English>
|
||||
<Chinese>
|
||||
@@ -876,7 +877,7 @@ row 4 | |
|
||||
|
||||
<text key='#prepar_installation.help'>
|
||||
<English>
|
||||
Installation information recorded the process which the users choose operations during installation. Including: record the operation of the physical hard disk, choose the software packages which use to install and server to start system.
|
||||
Installation information recorded the configuration the user chose during the installation, including the operation to the physical hard disks, the software packages chose to install, the selected self-starting servers since system startup, etc.
|
||||
</English>
|
||||
<Chinese>
|
||||
安装信息记录了用户在安装过程中所配置的数据。内容包括:对物理硬盘的操作,选择安装的软件包,选择系统启动时自启的服务等。
|
||||
@@ -890,7 +891,8 @@ row 4 | |
|
||||
|
||||
<text key='#mount.help'>
|
||||
<English>
|
||||
There are five columns in the mount point display frame. The first is the hard disk partition, such as sdaX, mdx. The second is the mount point. The third is the file system of hard disk . The fourth is that if your format hard disk partition, "yes" means do ,"no" means don't . The fifth is the size of hard disk and raid equipment.
|
||||
There are five columns in the mount point display frame. The first column lists the hard disk partitions, such as sdaX, mdx. The second lists the mount points. The third lists the file system type of the partitions. The fourth lists the choices whether to format the partitions, "yes" means do , "no" means don't . The fifth lists the sizes of the partitions or the raid devices.
|
||||
Click one row to change configurations of the hard disk partition, including the mount point, whether to format the partition, the file system type, etc.
|
||||
</English>
|
||||
<Chinese>
|
||||
设置挂载点显示框中分为五列,第一列是硬盘分区,如sdaX、mdX。第二列是挂载点,是挂载硬盘分区时所在的目录。第三列是硬盘分区的文件系统类型。第四列是指是否要格式化该硬盘分区,no表示不格式化,yes表示要格式化。第五列是各硬盘分区或raid设备的大小。
|
||||
@@ -900,12 +902,12 @@ row 4 | |
|
||||
|
||||
<text key='#network.help'>
|
||||
<English>
|
||||
The host name identifies the computer system which use various forms of electronic transmission to identify the specific computer system.
|
||||
Installation the program offers two ways. It is dynamic configureation IP (DHCP) and static configuration IP.
|
||||
Dynamic allocation: It distributes IP address when you start your computer system every time. If you use dynamic IP address, it is necessary to ensure that computer network environment which there is DHCP server.
|
||||
Staic configuration: Using a static IP address,netmask,gateway and DNS server. If you choose static IP, you must promise IP address,netmask,gateway,DNS cannot be empty.
|
||||
Domain represent a name or a location that a unit, a organization or individual person use in the internet.
|
||||
IP address,netmask,gateway,DNS: Input the four numbers from 0 to 255 by dots. E.g: 192.168.1.1
|
||||
Hostname is used to identify computers. It could identify a specific computer system in various forms of electronic transmissions.
|
||||
The installation program offers two ways to set an IP address of the host. One is automatically configuration (DHCP) and the other is manually configuration.
|
||||
Automatically Configuration: DHCP allows a computer to be configured automatically. The DHCP sever will allocate an IP address to the host since the host startup. If you want to choose this way to get an IP address, make sure there is an DHCP sever in the network.
|
||||
Manually configuration: You could manually configure an static IP address, netmask, gateway and DNS server. If you choose to use this way to set an IP address, the netmask, gateway, DNS server and domain must be configured also.
|
||||
Domain could be a definitized name or location in the internet used by an unit, an organization or private person.
|
||||
IP address, netmask, gateway, primary DNS server, secondary DNS server: Input four numbers, each ranging from 0 to 255, separated by dots, e.g., 192.168.1.1 .
|
||||
</English>
|
||||
<Chinese>
|
||||
主机名标识计算机系统,主要用于各种形式的电子传输,以鉴别特定的计算机系统。
|
||||
@@ -927,16 +929,23 @@ row 4 | |
|
||||
<Chinese>磐石 4.2</Chinese>
|
||||
</text>
|
||||
|
||||
<text key='#raid-add-warning'>
|
||||
<English>When adding a raid device, active list can not be null, and one raid level must be selected</English>
|
||||
<Chinese>当添加raid设备时,活动设备列表不能为空,并且必须选定一个raid级别。</Chinese>
|
||||
<text key='#raid-add-active-numbers'>
|
||||
<English>When make a raid0 or raid1, the partitions on the active display frame, must be more than one!</English>
|
||||
<Chinese>当制作raid0或raid1时,硬盘分区必须两个或两个以上。</Chinese>
|
||||
</text>
|
||||
|
||||
<text key='#raid-add-active-warning'>
|
||||
<English>Active display frame can not be empty</English>
|
||||
<Chinese>活动框不能为空</Chinese>
|
||||
<text key='#raid-add-active-2numbers'>
|
||||
<English>When make a raid5, the partitions on the active display frame, must be more than two!</English>
|
||||
<Chinese>当制作raid5的时,硬盘分区必须三个或三个以上。</Chinese>
|
||||
</text>
|
||||
|
||||
<text key='#raid-add-warning'>
|
||||
<English>When adding a raid device, active list can not be null, and one raid level must be selected!</English>
|
||||
<Chinese>当添加raid设备时,使用设备列表不能为空,并且必须选定一个raid级别。</Chinese>
|
||||
</text>
|
||||
|
||||
|
||||
|
||||
<text key='#raid-delete-warning'>
|
||||
<English>You can not delete an existing raid, which is not made by I (install program)!</English>
|
||||
<Chinese>对于一个早已存在的raid设备(不是由安装程序创建的),你不能把它删除。</Chinese>
|
||||
@@ -944,22 +953,24 @@ row 4 | |
|
||||
|
||||
<text key='#raid.help'>
|
||||
<English>
|
||||
RAID is a way to multi-block independentHard drive(Physical disk ) in different ways combined to form a disk group (logical drives) , which provides than a single disk more storage performance and providing data backup technology.
|
||||
If your don't know RAID,plase press next step,which don't effect Rocky OS installation and run.
|
||||
The hard disk in the raw display frame is able to make the RAID, E.g sda2,sdb2. The RAID’s equipments in the Device display frame have already existed. E.g: md0. Rocky os installation keep original raid equipment. If your want to make a RAID, please choose one or more hard disk in the Raw box, and press "-->". Hard disk will turn into active box or free box. If the hard disk turns into the active box, you can make a raid. After performing the operation, please choose level in Level box. In the end, you can make a raid according to press '-->'.
|
||||
RAID is a technology that provides increased storage reliability through redundancy, combining multiple low-cost, less-reliable disk drives components into a logical unit where all drives in the array are interdependent.
|
||||
If you don't want to make a RAID, you could click "next" to skip this step. The installation will go on normally.
|
||||
The partitions whose file system type are raid are listed in the Original frame, e.g., sda2, sdb2. The RAID are listed in the Device frame, e.g., md0, md1. The partitions to make a RAID are listed in the Active frame, and the spare partitions for the RAID are listed in the Spare frame.
|
||||
The original RAID will be retained. If you want to make a new RAID, select partitions in the original frame, then click "-->" to move them to the Active frame or Spare frame, according to their roles. There must be one or more partitions in the Active frame, relating to the raid level you want to make, but the spare partitions are not essential. A new RAID, named mdX (X stands for the number of the RAID), will be listed in the Device frame after you click "-->" beside the Device frame.
|
||||
</English>
|
||||
<Chinese>
|
||||
磁盘陈列技术(RAID)诞生于1987年,由美国加州大学伯克利分校提出。该技术是把多块独立的硬盘(物理硬盘)按不同的方式组合起来形成一个硬盘组(逻辑硬盘),从而提供比单个硬盘更高的存储性能和提供数据备份技术。
|
||||
如果用户不懂该技术可以直接点击下一步,系统将不制作RAID,并不影响系统的安装及运行。
|
||||
原始框中是满足制作RAID的硬盘分区,如sda1、sdb2等。设备框中是原本系统已经制作好的RAID,如md0、md1等。系装安装时将保留原有的RAID设备。若要制作新RAID,请在原始框中选中硬盘分区后通过点击"->",硬盘分区会进入活动框或空闲框中。要制作RAID,活动框中必须要有硬盘分区,可以有一个或多个。空闲框中硬盘分区是可选的,可以有一个或多个,也可以没有。完成上步操作后在级别框中选择raid的级别,最后点击"->"在设备框中产生新的mdX设备。
|
||||
原始框中是满足制作RAID的硬盘分区,如sda1、sdb2等。设备框中是原本系统已经制作好的RAID,如md0、md1等。系装安装时将保留原有的RAID设备。若要制作新RAID,请在原始框中选中硬盘分区后通过点击"->",硬盘分区会进入使用框或备用框中。要制作RAID,使用框中必须要有硬盘分区,可以有一个或多个。备用框中硬盘分区是可选的,可以有一个或多个,也可以没有。完成上步操作后在级别框中选择raid的级别,最后点击"->"在设备框中产生新的mdX设备。
|
||||
</Chinese>
|
||||
</text>
|
||||
|
||||
<text key='#serial number.help'>
|
||||
<English>
|
||||
The serial number is that computer systems security operations of the Linx. In the serial number display frame, please input correct serial number so that the Rocky system can be start after the operating system installed.
|
||||
How to get the serial number?please contact Linx.
|
||||
web: www.linx-info.com
|
||||
Serial number is the permission to run secure functions of Linx Rocky Secure OS.
|
||||
Please Input the correct serial number in the frame, so that secure functions could run.
|
||||
Please contact Linx Technology Co.,Ltd. to get the serial number.
|
||||
Website: www.linx-info.com
|
||||
</English>
|
||||
<Chinese>
|
||||
安装序列号是计算机运行凝思磐石安全操作系统的许可,请在序列号框内输入正确的序列号,以便操作系统的安全功能,能从计算机启动。
|
||||
@@ -970,7 +981,8 @@ row 4 | |
|
||||
|
||||
<text key='#service.help'>
|
||||
<English>
|
||||
Display frame illustrate which type of service will be supported after installation. Gray box means this service cann't be supported because there is no match with software package.
|
||||
The color of the servers listed in the frame suggests whether they are self-starting since system startup. Gary means no, and the probable
|
||||
reason is packages providing the servers haven't been selected to install.
|
||||
</English>
|
||||
<Chinese>
|
||||
显示框中表示系统启动过程中自动启动的服务。
|
||||
@@ -979,14 +991,15 @@ row 4 | |
|
||||
</text>
|
||||
<text key='#software group.help'>
|
||||
<English>
|
||||
Package group was divided into required and optional parts. They system will be installed by default which in the Required Software. To install the optional packages, you can first click on an optional package group and find it.
|
||||
Base package group is required parts. Basic package include required and optional aparts. Required packages are installed by default, the optional package can be free to choose.
|
||||
Development package group, including C, C++, DDD and other developed tolls are available. You can choose to install.
|
||||
Graphics software package group, including the various procedures related XII. Graphics software package can be divided into the required and optional package. When you select to choose this kind of package, the required one is installed by default and the optional one is free.
|
||||
Network service package group is optional package , various network services package and network service software can choose to install.
|
||||
Internet software, including World Wide Web browser and Firefox, divided into required and optional packages. The first is installed by default and the last one is free to choose.
|
||||
Multimedia package group, including a variety of media library. Multimedia software packages are optional packages can choose to install.
|
||||
Another package group is optional one, so you can choose to install freely.
|
||||
There are two kinds of packages and package groups, one is mandatory, the other is optional.
|
||||
The mandatory packages of a group will be installed by default if you select the group. You could first click a group, and then select optional packages want to install in the pop-up dialog box.
|
||||
Base group is the only mandatory group to install, consist of packages for a base system. The mandatory packages of Base group will be installed by default, you could select optional packages of it.
|
||||
Development group is consist of tools of C, C++, DDD, etc. There's no mandatory package in Development group, you could select optional packages of it.
|
||||
GUI group is consist of various packages relating to X11. There are mandatory packages and optional packages. Mandatory packages will be installed by default if you select this group. You could select optional packages freely.
|
||||
Network group is consist of various network sevices packages. There's no mandatory package, you could select optional packages of it.
|
||||
Internet group is consist of software like World Wide Web browser Firefox. There are mandatory packages and optional packages. Mandatory packages will be installed by default if you select this group. You could select optional packages freely.
|
||||
Multimedia group is consist of a variety of media libraries.There's no mandatory package, you could select optional packages of it.
|
||||
Others group is consist of packages that are not included in groups above, e.g., kde, vm, network tools. There's no mandatory package, you could select optional packages of it.
|
||||
</English>
|
||||
<Chinese>
|
||||
软件包组分为必选软件包组和可选软件包。系统默认时会安装必选软件包组里的必选软件包。在安装软件包时,先点击软件包组,在弹出的对话框中选上所须要的软件包。
|
||||
@@ -1007,22 +1020,10 @@ row 4 | |
|
||||
|
||||
<text key='#Welcome.help'>
|
||||
<English>
|
||||
Respect of user, hello! welcome to use that the operating system. Rocky!
|
||||
Dear user, welcome to Linx Rocky Secure OS!
|
||||
</English>
|
||||
<Chinese>
|
||||
尊敬的用户,你好!欢迎使用凝思磐石操作系统。
|
||||
凝思磐石安全操作系统遵循国内外安全操作系统GB17859、GB/T18336、GJB4936、 GJB4937、GB/T20272以及POSIX、TCSEC、ISO15408等标准进行设计和实现,为我国用户提供拥有自主知识产权、高安全、高可用和高效的操作系统平台。凝思科技经过多年的研究,开发出的凝思磐石安全操作系统具有以下主要特点:
|
||||
高安全性
|
||||
安全性是凝思磐石安全操作系统的主要特征,充分结合凝思科技的独有技术与国内外多项安全标准的要求,在操作系统和应用程序的各个层次进行安全增强,使系统成为安全的有机整体。主要安全机制有一下几点:强制运行机制(MEC)、强制能力控制(MCC)、访问控制列表(ACL)、强制访问控制(MAC)、四权分立的系统管理
|
||||
高可用性
|
||||
凝思磐石安全操作系统发布前进行了长时间的压力测试,能够保证高内存和CPU负载环境下的稳定运行,为各类应用提供稳定运行平台。
|
||||
高兼容性
|
||||
凝思磐石安全操作系统系列产品包括安全服务器版、安全工作站版、安全专用设备版和安全桌面版,适用于从大型计算到桌面办公等各种环境,支持各类通用和专业应用,具有良好的软、硬件兼容性.
|
||||
凝思磐石安全操作系统提供丰富的驱动程序,支持各类主流磁盘驱动器、网卡驱动器和显示控制器等硬件设备。兼容国内外各大主流厂商的多款服务器和桌面计算机。凝思科技还可协助第三方硬件厂商完成驱动程序的研发和移植,实现加密卡等专用硬件设备支持。
|
||||
高效性
|
||||
凝思磐石安全操作系统的每一款产品均针对服务器、工作站、专用设备和桌面环境进行特别优化,能够获得比通用操作系统更高的运行效率.
|
||||
易维护性
|
||||
凝思磐石安全操作系统的配置、使用和维护方法与传统UNIX和Linux保持一致,提供丰富的管理和维护软件,既可通过命令行工具完成系统配置和维护,又可通过图形界面完成相关操作,简化用户操作步骤,减少系统管理员的维护工作量。
|
||||
</Chinese>
|
||||
</text>
|
||||
|
||||
@@ -1033,7 +1034,7 @@ row 4 | |
|
||||
|
||||
<text>
|
||||
<English>Active</English>
|
||||
<Chinese>活动</Chinese>
|
||||
<Chinese>使用</Chinese>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
@@ -1223,7 +1224,7 @@ row 4 | |
|
||||
|
||||
<text>
|
||||
<English>Spare</English>
|
||||
<Chinese>空闲</Chinese>
|
||||
<Chinese>备用</Chinese>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
|
||||
Reference in New Issue
Block a user