Skip to content

Commit

Permalink
fix $default_file definition on Ubuntu > 24.04 and Debian > 13
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed May 18, 2024
1 parent 36da141 commit bfc4707
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@

case $facts['os']['name'] {
/(Ubuntu|Debian|LinuxMint|Linuxmint|Raspbian|Kali|Pop!_OS)/: {
case $facts['os']['name'] {
'Debian': {
if versioncmp($facts['os']['release']['full'], '12') > 0 {
$default_file = '/etc/locale.conf'
}
}
'Ubuntu': {
if versioncmp($facts['os']['release']['full'], '24.04') >= 0 {
$default_file = '/etc/locale.conf'
}
}
default: {
$default_file = '/etc/default/locale'
}
if $facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '12') > 0 {
$default_file = '/etc/locale.conf'
} elsif $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '24.04') >= 0 {
$default_file = '/etc/locale.conf'
} else {
$default_file = '/etc/default/locale'
}

$locale_gen_cmd = '/usr/sbin/locale-gen'
Expand Down

0 comments on commit bfc4707

Please sign in to comment.