summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/host_name.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index a0ed815ae..c5268df2a 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -116,7 +116,12 @@ def get_config(arguments):
for search in conf.return_values("system domain-search domain"):
hosts['domain_search'].append(search)
- hosts['nameserver'] = conf.return_values("system name-server")
+ if conf.exists("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")
+
hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers')
return hosts