From 05b407b6c74b939a02c3d97ffe4a92faf0325284 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 25 Jan 2013 02:36:08 +0900 Subject: fix test when missing system updown script --- src/leap/eip/tests/test_config.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/leap/eip/tests/test_config.py') 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? -- cgit v1.2.3