X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=ac15f4789f78ed7555dc39fe209b0b728012adb5;hb=742b9c32cd0eabdc05044327ead70ac864924017;hp=e3956756fc1b625728d465b8e1753289760cd7da;hpb=0f2f72fcff88606d5bc2d5e2c338917503ed3746;p=mirror%2Fdsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index e3956756f..ac15f4789 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -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!" - 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