diff --git a/interface/ri_cmd.py b/interface/ri_cmd.py index 08f3354..ad8f8c1 100644 --- a/interface/ri_cmd.py +++ b/interface/ri_cmd.py @@ -30,7 +30,7 @@ def next(): q, t = ri_widget.Sequence.current() wid_name = ri_widget.Sequence.next() if wid_name is not None: - ri_widget.Widget.dict[t].hide(t) + ri_widget.Widget.dict[t].hide() ri_widget.Widget.dict[wid_name].show() else: diff --git a/interface/ri_oper.py b/interface/ri_oper.py index 6db4c28..1cd4a1b 100644 --- a/interface/ri_oper.py +++ b/interface/ri_oper.py @@ -331,7 +331,7 @@ class ConfigureBootloader(Operation): 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()] + 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()] for k in Mount.dict.keys(): if '/' == Mount.dict[k]: diff --git a/interface/ri_tk.py b/interface/ri_tk.py index c4ebb1e..a07b0d1 100644 --- a/interface/ri_tk.py +++ b/interface/ri_tk.py @@ -154,21 +154,18 @@ def create_widget_sub(w, p_win): # while destroying a widget, only destroy one. Tk functions will # destroy all descendant. # so init is a little different from quit. -def process_action_quit(w,step=''): +def process_action_quit(w): ''' process action quit ''' if 'action' in dir(w) and 'quit' in w.action.dict: - if step == 'network': - getattr(sys.modules['ri_cmd'], w.action.dict['quit'])(step) - else: - getattr(sys.modules['ri_cmd'], w.action.dict['quit'])() + getattr(sys.modules['ri_cmd'], w.action.dict['quit'])() if 'widgets' in dir(w): for sub_w in w.widgets: process_action_quit(sub_w) -def destroy_widget(w,step=''): +def destroy_widget(w): ''' w - Widget instance ''' - process_action_quit(w,step) + process_action_quit(w) w.tk_widget.destroy() def create_message_box(w): diff --git a/interface/ri_tk_cmd.py b/interface/ri_tk_cmd.py index 749d6fc..2d28226 100644 --- a/interface/ri_tk_cmd.py +++ b/interface/ri_tk_cmd.py @@ -116,7 +116,7 @@ def network_init(): display.var_dict['network_primary_dns']. set(value=ri_data.Network.primary_dns) display.var_dict['network_secondary_dns'].set(value=ri_data.Network.secondary_dns) -def network_quit(step=''): +def network_quit(): ''' network quit ''' ri_data.Network.hostname = display.var_dict['network_host_name'].get() ri_data.Network.configuration = display.var_dict['network_config_method'].get() @@ -127,15 +127,14 @@ def network_quit(step=''): ri_data.Network.primary_dns = display.var_dict['network_primary_dns'].get() ri_data.Network.secondary_dns = display.var_dict['network_secondary_dns'].get() - if step == "network": - if not ri_data.Network.hostname: - ri_widget.MessageBox.dict['check_ip_hostname'].show() - if ri_data.Network.configuration == "static" and \ - not ri_data.Network.ip and \ - not ri_data.Network.mask and \ - not ri_data.Network.gateway and \ - not ri_data.Network.primary_dns : - ri_widget.MessageBox.dict['check_ip_hostname'].show() + if not ri_data.Network.hostname: + ri_widget.MessageBox.dict['check_ip_hostname'].show() + elif ri_data.Network.configuration == "static" and \ + (not ri_data.Network.ip or \ + not ri_data.Network.mask or \ + not ri_data.Network.gateway or \ + not ri_data.Network.primary_dns) : + ri_widget.MessageBox.dict['check_ip_hostname'].show() def ncm_dynamic(): ''' when radio button ncm dynamic is checked, several data entry will be set 'disable' ''' diff --git a/interface/ri_widget.py b/interface/ri_widget.py index 846bcb4..674f869 100644 --- a/interface/ri_widget.py +++ b/interface/ri_widget.py @@ -89,8 +89,8 @@ class Widget: Widget.current_widget = self display.create_widget(self) - def hide(self,step=''): - display.destroy_widget(self,step) + def hide(self): + display.destroy_widget(self) class MessageBox: ''' implement dialog in interface.xml '''