summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/migration-scripts/dhcp-server/4-to-58
1 files changed, 5 insertions, 3 deletions
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 <xyz> 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: