From f8b7e3b2b20d143643bfac72db68943dfc9046f1 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 20 Apr 2019 16:25:36 +0200 Subject: [dhcp-server] T1335: bugfix when migrating authoritative section --- src/migration-scripts/dhcp-server/4-to-5 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/migration-scripts/dhcp-server') diff --git a/src/migration-scripts/dhcp-server/4-to-5 b/src/migration-scripts/dhcp-server/4-to-5 index 8b973d608..baccd5a2b 100755 --- a/src/migration-scripts/dhcp-server/4-to-5 +++ b/src/migration-scripts/dhcp-server/4-to-5 @@ -105,11 +105,13 @@ else: # Make node "set service dhcp-server shared-network-name authoritative" valueless if config.exists(['service', 'dhcp-server', 'shared-network-name', network, 'authoritative']): - bool_val = config.return_value(['service', 'dhcp-server', 'shared-network-name', network, 'authoritative']) + authoritative = config.return_value(['service', 'dhcp-server', 'shared-network-name', network, 'authoritative']) + # Delete the node with the old syntax config.delete(['service', 'dhcp-server', 'shared-network-name', network, 'authoritative']) - if str(bool_val) == 'true': - # Recreate node with new syntax + + # Recreate node with new syntax - if required + if authoritative == "enable": config.set(['service', 'dhcp-server', 'shared-network-name', network, 'authoritative']) try: -- cgit v1.2.3