Skip to content

Commit

Permalink
handle search_domains which do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-becker committed Jun 1, 2017
1 parent 73cd19b commit 77d4d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/os_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ function set_dns_server(servers, search_domains) {
commands_to_exec.push("sed -i 's/.*NooBaa Configured Secondary DNS Server.*/#NooBaa Configured Secondary DNS Server/' /etc/resolv.conf");
}

if (search_domains.length) {
if (search_domains && search_domains.length) {
commands_to_exec.push("sed -i 's/.*NooBaa Configured Search.*/search " +
search_domains + " #NooBaa Configured Search/' /etc/resolv.conf");
} else {
Expand Down

0 comments on commit 77d4d02

Please sign in to comment.