resolvconf = ''
resolvconf += "search " + searchpaths.join(" ") + "\n"
-if defined?(unbound) and unbound and unbound == "true"
+if has_variable?('unbound') and unbound and unbound == "true"
resolvconf += "nameserver 127.0.0.1\n"
else
if nameservers.empty?