summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2019-07-02 21:07:25 +0200
committerGitHub <noreply@github.com>2019-07-02 21:07:25 +0200
commit768e73ccba8aa9e512abb3f836743a7c6af53f5d (patch)
tree02b66580c1157931f1e88c36c09a573c83a324ab /src/conf_mode
parent7ba6c4a71cf29f58b0b5eae33eca0187372d5a94 (diff)
parent6c2b62eafa0e2224fdc492c55d255228593ad960 (diff)
downloadvyos-1x-768e73ccba8aa9e512abb3f836743a7c6af53f5d.tar.gz
vyos-1x-768e73ccba8aa9e512abb3f836743a7c6af53f5d.zip
Merge pull request #83 from UnicronNL/current
T1497: "set system name-server" generates invalid/incorrect resolv.conf
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/host_name.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index b0a4648c7..43f36dd35 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -124,7 +124,10 @@ def get_config(arguments):
hosts['domain_search'].append(search)
if conf.exists("system name-server"):
- hosts['nameserver'] = conf.return_values("system name-server")
+ if not isinstance(conf.return_values("system name-server"), list):
+ hosts['nameserver'] = conf.return_values("system name-server").replace("'", "").split()
+ else:
+ hosts['nameserver'] = conf.return_values("system name-server")
if conf.exists("system disable-dhcp-nameservers"):
hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers')