Skip to content

Commit

Permalink
BIND 9.18 compatiblity on Ubuntu 20.04
Browse files Browse the repository at this point in the history
A security update on Ubuntu 20.04 brought BIND 9.18 which moves
named-checkconf from /usr/sbin to /usr/bin.

This removes the need for the conditional because now all supported
versions use /usr/bin.
  • Loading branch information
ekohl committed Aug 16, 2024
1 parent facab03 commit 44d7956
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$group = 'bind'
$rndcconfgen = '/usr/sbin/rndc-confgen'
$named_checkconf = $facts['os']['name'] ? {
'Ubuntu' => if versioncmp($facts['os']['release']['major'], '22.04') >= 0 { '/usr/bin/named-checkconf' } else { '/usr/sbin/named-checkconf' },
'Ubuntu' => '/usr/bin/named-checkconf',
default => if versioncmp($facts['os']['release']['major'], '12') >= 0 { '/usr/bin/named-checkconf' } else { '/usr/sbin/named-checkconf' },
}
$sysconfig_file = '/etc/default/named'
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/dns_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
let(:checkconf) {
case facts[:os]['family']
when 'Debian'
['22.04', '12'].include?(facts[:os]['release']['major']) ? "/usr/bin/named-checkconf" : "/usr/sbin/named-checkconf"
facts[:os]['release']['major'] != '11' ? "/usr/bin/named-checkconf" : "/usr/sbin/named-checkconf"
when 'FreeBSD'
'/usr/local/sbin/named-checkconf'
else
Expand Down

0 comments on commit 44d7956

Please sign in to comment.