summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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')