From ab4b85d0027e47a7c28564c9adcc5ec2fa6da1e4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 28 May 2021 21:53:11 +0200 Subject: ipsec: T2816: drop absolute path on calls to iproute2 --- src/etc/ipsec.d/vti-up-down | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/etc/ipsec.d/vti-up-down b/src/etc/ipsec.d/vti-up-down index 416966056..9abca1fd6 100755 --- a/src/etc/ipsec.d/vti-up-down +++ b/src/etc/ipsec.d/vti-up-down @@ -12,7 +12,8 @@ def get_config(config, base): if not config.exists(base): return None - return conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True, no_tag_node_value_mangle=True) + return conf.get_config_dict(base, key_mangling=('-', '_'), + get_first_key=True, no_tag_node_value_mangle=True) def get_dhcp_address(interface): addr = get_interface_address(interface) @@ -31,7 +32,7 @@ if __name__ == '__main__': print(f'vti-up-down: start: {verb} {connection} {interface}') if verb in ['up-client', 'up-host']: - call('sudo /usr/sbin/ip route delete default table 220') + call('sudo ip route delete default table 220') vti_base = ['interfaces', 'vti', interface] ipsec_base = ['vpn', 'ipsec', 'site-to-site'] @@ -72,11 +73,11 @@ if __name__ == '__main__': if not vti_link_up: if 'dhcp_interface' in peer_conf: local_ip = get_dhcp_address(peer_conf['dhcp_interface']) - call(f'sudo /usr/sbin/ip tunnel change {interface} local {local_ip}') + call(f'sudo ip tunnel change {interface} local {local_ip}') if child_sa_installed: - call(f'sudo /usr/sbin/ip link set {interface} up') + call(f'sudo ip link set {interface} up') elif verb in ['down-client', 'down-host']: if vti_link_up and not child_sa_installed: - call(f'sudo /usr/sbin/ip link set {interface} down') + call(f'sudo ip link set {interface} down') print('vti-up-down: finish') -- cgit v1.2.3