]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/resolv/templates/resolv.conf.erb
Try to work without nameservers
[dsa-puppet.git] / modules / resolv / templates / resolv.conf.erb
index ad7ac72381c2f8fdcde9894da4cc0fc5b75592e9..4ba636767beb090e82394574e002c4d21c4a44e8 100644 (file)
@@ -21,11 +21,14 @@ searchpaths << "debian.org"
 resolvconf  = ''
 resolvconf += "search " + searchpaths.join(" ") + "\n"
 
-if unbound and unbound == "true"
+if defined?(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!"
+    #raise Puppet::ParseError, "Something has gone wrong writing resolv.conf.  No nameservers to use!"
+    STDERR.put "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
 
   nameservers.each do |ns|