Skip to content

Commit 77d4d02

Browse files
committed
handle search_domains which do not exist
1 parent 73cd19b commit 77d4d02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/os_utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ function set_dns_server(servers, search_domains) {
458458
commands_to_exec.push("sed -i 's/.*NooBaa Configured Secondary DNS Server.*/#NooBaa Configured Secondary DNS Server/' /etc/resolv.conf");
459459
}
460460

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

0 commit comments

Comments
 (0)