Commit 386a885a by Sandro kensan

add testOpennic thas I have accidentally deleted:

# python opennic-set.py -t
Testing…  Ping OK - startpage.com
test SUCCESSFUL: we can access domain URL like google.com

# python opennic-set.py -t
ping: unknown host startpage.com
Testing…  Warning: Server DNS down
ping: unknown host google.com
Warning: Server DNS down
ping: unknown host opendns.com
Warning: Server DNS down
ping: unknown host kensan.it
Warning: Server DNS down
test FAILED: we can't access domain URL like google.com
parent bf29b57d
......@@ -283,7 +283,17 @@ def main(*args):
print " Stay with old servers."
print
def testOpennic():
"""Tests if we can access Internet via domain names
"""
print "Testing… ",
status = test_domain("Warning: Server DNS down")
if status == "down":
print "test FAILED: we can't access domain URL like google.com"
return 1
else: #status == "up"
print "test SUCCESSFUL: we can access domain URL like google.com"
return 0
def undo(conf_dir):
"""Put back the original configuration files."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment