]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/resolv/templates/resolv.conf.erb
continued fight against templates, 3
[dsa-puppet.git] / modules / resolv / templates / resolv.conf.erb
index 67f8d64a5462e0ac376f4fceaf9d93c1019843e9..ac15f4789f78ed7555dc39fe209b0b728012adb5 100644 (file)
@@ -21,12 +21,12 @@ searchpaths << "debian.org"
 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?
     #raise Puppet::ParseError, "Something has gone wrong writing resolv.conf.  No nameservers to use!"
-    scope.function_warning("Something has gone wrong writing resolv.conf.  No nameservers to use - using google's!")
+    scope.function_warning(["Something has gone wrong writing resolv.conf.  No nameservers to use - using google's!"])
     nameservers << '8.8.8.8'
     nameservers << '8.8.4.4'
   end