From 4e4dacee281059fdbca6531ace53f22817a62650 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 22 Jul 2021 19:56:19 +0200 Subject: ipsec: T2816: remove "auto-update" CLI option Update/refresh of DNS records is now handled internally by Strongswan. --- src/conf_mode/vpn_ipsec.py | 5 +---- src/migration-scripts/ipsec/5-to-6 | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/conf_mode/vpn_ipsec.py b/src/conf_mode/vpn_ipsec.py index c50724592..f1c6b216b 100755 --- a/src/conf_mode/vpn_ipsec.py +++ b/src/conf_mode/vpn_ipsec.py @@ -544,10 +544,7 @@ def apply(ipsec): if not ipsec: call('sudo ipsec stop') else: - args = '' - if 'auto_update' in ipsec: - args = '--auto-update ' + ipsec['auto_update'] - call(f'sudo ipsec restart {args}') + call('sudo ipsec restart') call('sudo ipsec rereadall') call('sudo ipsec reload') diff --git a/src/migration-scripts/ipsec/5-to-6 b/src/migration-scripts/ipsec/5-to-6 index 76ee9ecba..e9adee01b 100755 --- a/src/migration-scripts/ipsec/5-to-6 +++ b/src/migration-scripts/ipsec/5-to-6 @@ -80,6 +80,11 @@ if config.exists(base_interfaces): config.copy(base_interfaces, base + ['interface']) config.delete(base_interfaces) +# Remove deprecated "auto-update" option +tmp = base + ['auto-update'] +if config.exists(tmp): + config.delete(tmp) + try: with open(file_name, 'w') as f: f.write(config.to_string()) -- cgit v1.2.3