diff --git a/interface/ri_cmd.py b/interface/ri_cmd.py
index ad8f8c1..49d1e06 100644
--- a/interface/ri_cmd.py
+++ b/interface/ri_cmd.py
@@ -4,6 +4,8 @@
import ri_widget
import os
import ri_tk
+from ri_data import Network
+from ri_tk_cmd import network_quit as network_update
def quit():
''' correspond to quit button '''
@@ -28,6 +30,10 @@ def previous():
def next():
''' correspond to next button '''
q, t = ri_widget.Sequence.current()
+
+ if not check_date(t):
+ return
+
wid_name = ri_widget.Sequence.next()
if wid_name is not None:
ri_widget.Widget.dict[t].hide()
@@ -37,6 +43,17 @@ def next():
code = ri_widget.MessageBox.dict["next"].show()
if code == True:
os.execl('/usr/bin/python','python','ri_install.py', "-d","tk","-l",ri_tk.language)
-from ri_tk_cmd import *
-
+def check_date(operate):
+ '''check date '''
+ if operate == "network" :
+ network_update()
+ if not Network.hostname:
+ ri_widget.MessageBox.dict['check_ip_hostname'].show()
+ return False
+ if Network.configuration == "static" and not Network.check_ip() :
+ ri_widget.MessageBox.dict['check_ip_hostname'].show()
+ return False
+ return True
+
+from ri_tk_cmd import *
diff --git a/interface/ri_data.py b/interface/ri_data.py
index ac7e88c..20cd39a 100644
--- a/interface/ri_data.py
+++ b/interface/ri_data.py
@@ -450,6 +450,13 @@ p_node - xml node (parent node)'''
to_xml_attr(doc, ntwk, Network, nm)
p_node.appendChild(ntwk)
+ @staticmethod
+ def check_ip() :
+ """check network ip"""
+ if Network.ip and Network.mask and Network.gateway and Network.primary_dns:
+ return True
+ return False
+
class Group:
''' software package group '''
dict = {}
diff --git a/xml/interface.xml b/xml/interface.xml
index 812f32a..662377b 100644
--- a/xml/interface.xml
+++ b/xml/interface.xml
@@ -796,6 +796,7 @@ row 4 | |
+