diff --git a/manifests/params.pp b/manifests/params.pp index 1cce10b7c..0153a2ad8 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,6 +10,7 @@ $bindgroup = 'named' $file_hint = 'named.ca' $file_rfc1912 = '/etc/named.rfc1912.zones' + $checkzone_path = '/usr/sbin/named-checkzone' } 'Debian': { $packagenameprefix = 'bind9' @@ -18,6 +19,7 @@ $bindgroup = 'bind' $file_hint = '/etc/bind/db.root' $file_rfc1912 = '/etc/bind/named.conf.default-zones' + $checkzone_path = '/usr/sbin/named-checkzone' } 'Freebsd': { $packagenameprefix = 'bind910' @@ -26,6 +28,7 @@ $bindgroup = 'bind' $file_hint = 'named.ca' $file_rfc1912 = '/etc/named.rfc1912.zones' + $checkzone_path = '/usr/local/sbin/named-checkzone' } default: { $packagenameprefix = 'bind' @@ -34,6 +37,7 @@ $bindgroup = 'named' $file_hint = 'named.ca' $file_rfc1912 = '/etc/named.rfc1912.zones' + $checkzone_path = '/usr/sbin/named-checkzone' } } diff --git a/manifests/server/file.pp b/manifests/server/file.pp index a8794ec84..3cd3ec732 100644 --- a/manifests/server/file.pp +++ b/manifests/server/file.pp @@ -59,6 +59,8 @@ $zone_source = undef } + $checkzone_path = $::bind::params::checkzone_path + if ! defined(File[$zonedir]) { file { $zonedir: ensure => 'directory', @@ -76,7 +78,7 @@ mode => $mode, source => $zone_source, content => $content, - validate_cmd => "/usr/sbin/named-checkzone ${zonename} %", + validate_cmd => "${checkzone_path} ${zonename} %", notify => Class['::bind::service'], # For the parent directory require => [