summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-07-02 13:10:40 -0700
committerhagbard <vyosdev@derith.de>2019-07-02 13:10:40 -0700
commitfeaf914cbb70c3a810ccde6f00d157e536d350d8 (patch)
treeeea2053eb5ceba3da3b51e9573418a75bf57dc62 /src/conf_mode/host_name.py
parentc35d1b7a1d958327f67c806740428929ff86b151 (diff)
parent768e73ccba8aa9e512abb3f836743a7c6af53f5d (diff)
downloadvyos-1x-feaf914cbb70c3a810ccde6f00d157e536d350d8.tar.gz
vyos-1x-feaf914cbb70c3a810ccde6f00d157e536d350d8.zip
Merge branch 'current' of https://github.com/vyos/vyos-1x into current
Diffstat (limited to 'src/conf_mode/host_name.py')
-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')