diff options
Diffstat (limited to 'src/migration-scripts/sstp/0-to-1')
-rwxr-xr-x | src/migration-scripts/sstp/0-to-1 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/migration-scripts/sstp/0-to-1 b/src/migration-scripts/sstp/0-to-1 index 0fe1a203f..88d3b4fb4 100755 --- a/src/migration-scripts/sstp/0-to-1 +++ b/src/migration-scripts/sstp/0-to-1 @@ -45,6 +45,19 @@ else: config.copy(old_base, new_base) config.delete(old_base) + # migrate DNS servers + dns_base = new_base + ['network-settings', 'dns-server'] + if config.exists(dns_base): + if config.exists(dns_base + ['primary-dns']): + dns = config.return_value(dns_base + ['primary-dns']) + config.set(new_base + ['network-settings', 'name-server'], value=dns, replace=False) + + if config.exists(dns_base + ['secondary-dns']): + dns = config.return_value(dns_base + ['secondary-dns']) + config.set(new_base + ['network-settings', 'name-server'], value=dns, replace=False) + + config.delete(dns_base) + print(config.to_string()) sys.exit(1) |