diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-04-20 16:25:36 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-04-20 16:49:25 +0200 |
commit | afbd14c8a97984f7b1385ee6eaff08a7e2264956 (patch) | |
tree | 19729e95e43f3ac1dd35ce37b84da62924bd1a8c /src/migration-scripts/dhcp-server | |
parent | eb8943a0fe2d37bb981573361e56b28511844503 (diff) | |
download | vyos-1x-afbd14c8a97984f7b1385ee6eaff08a7e2264956.tar.gz vyos-1x-afbd14c8a97984f7b1385ee6eaff08a7e2264956.zip |
[dhcp-server] T1335: bugfix when migrating authoritative section
(cherry picked from commit f8b7e3b2b20d143643bfac72db68943dfc9046f1)
Diffstat (limited to 'src/migration-scripts/dhcp-server')
-rwxr-xr-x | src/migration-scripts/dhcp-server/4-to-5 | 8 |
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: |