From 50c506a9be56b548a8d461f3e019165c384f49d3 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 2 Nov 2023 20:15:49 -0500 Subject: ddclient: T5708: Migration to 3.11.1 and related improvements - Migrate to ddclient 3.11.1 and enforce debian/control dependency - Add dual stack support for additional protocols - Restrict usage of `porkbun` protocol, VyOS configuration structure isn't compatible with porkbun yet - Improve and cleanup error messages --- src/migration-scripts/dns-dynamic/1-to-2 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/migration-scripts') diff --git a/src/migration-scripts/dns-dynamic/1-to-2 b/src/migration-scripts/dns-dynamic/1-to-2 index 8aaedf210..8b599b57a 100644 --- a/src/migration-scripts/dns-dynamic/1-to-2 +++ b/src/migration-scripts/dns-dynamic/1-to-2 @@ -18,6 +18,8 @@ # - migrate "service dns dynamic timeout ..." # to "service dns dynamic interval ..." # - remove "service dns dynamic address web-options ..." when != "web" +# - migrate "service dns dynamic address service protocol dnsexit" +# to "service dns dynamic address service protocol dnsexit2" import sys from vyos.configtree import ConfigTree @@ -51,6 +53,15 @@ for address in config.list_nodes(address_path): if config.exists(address_path + [address, 'web-options']) and address != 'web': config.delete(address_path + [address, 'web-options']) +# Migrate "service dns dynamic address service protocol dnsexit" +# to "service dns dynamic address service protocol dnsexit2" +for address in config.list_nodes(address_path): + for svc_cfg in config.list_nodes(address_path + [address, 'service']): + if config.exists(address_path + [address, 'service', svc_cfg, 'protocol']): + protocol = config.return_value(address_path + [address, 'service', svc_cfg, 'protocol']) + if protocol == 'dnsexit': + config.set(address_path + [address, 'service', svc_cfg, 'protocol'], 'dnsexit2') + try: with open(file_name, 'w') as f: f.write(config.to_string()) -- cgit v1.2.3