summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-25 02:36:08 +0900
committerkali <kali@leap.se>2013-01-25 02:36:08 +0900
commit05b407b6c74b939a02c3d97ffe4a92faf0325284 (patch)
tree6223f12f755bc738fe5ff18f650660635f2137f0 /src/leap
parentb9cba4bc7b88420e0ee46a6f03dd4aa2fb1edd1e (diff)
fix test when missing system updown script
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/eip/tests/test_config.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/leap/eip/tests/test_config.py b/src/leap/eip/tests/test_config.py
index 05e78de4..72ab3c8e 100644
--- a/src/leap/eip/tests/test_config.py
+++ b/src/leap/eip/tests/test_config.py
@@ -136,13 +136,15 @@ class EIPConfigTest(BaseLeapTest):
args.append('2')
if _system == "Linux":
- args.append('--up')
- args.append('/etc/leap/resolv-update')
- args.append('--down')
- args.append('/etc/leap/resolv-update')
- args.append('--plugin')
- args.append('/usr/lib/openvpn/openvpn-down-root.so')
- args.append("'script_type=down /etc/leap/resolv-update'")
+ UPDOWN_SCRIPT = "/etc/leap/resolv-update"
+ if os.path.isfile(UPDOWN_SCRIPT):
+ args.append('--up')
+ args.append('/etc/leap/resolv-update')
+ args.append('--down')
+ args.append('/etc/leap/resolv-update')
+ args.append('--plugin')
+ args.append('/usr/lib/openvpn/openvpn-down-root.so')
+ args.append("'script_type=down /etc/leap/resolv-update'")
# certs
# XXX get values from specs?