]>
Commit | Line | Data |
---|---|---|
7fed35a4 IB |
1 | class base_installation::locales inherits base_installation { |
2 | # Note: we don't care about other lines, they are not handled in | |
3 | # Puppet | |
4 | define locale_line ($locale, $charmap = 'UTF-8') { | |
5 | file_line { "/etc/locale.gen#$locale": | |
6 | path => '/etc/locale.gen', | |
7 | line => "$locale $charmap ", | |
8 | match => "#?$locale $charmap +$", | |
9 | notify => Exec["/usr/bin/locale-gen"], | |
10 | } | |
11 | } | |
12 | ||
13 | unless empty($base_installation::system_locales) { | |
14 | $base_installation::system_locales.each |$locale| { | |
15 | base_installation::locales::locale_line { "/etc/locale.gen#$locale": | |
16 | locale => $locale | |
17 | } | |
18 | } | |
19 | ||
20 | $main_locale = $base_installation::system_locales[0] | |
21 | exec { "set_main_locale": | |
22 | command => "/usr/bin/systemd-firstboot --locale=$main_locale", | |
23 | creates => "/etc/locale.conf", | |
24 | } | |
25 | } | |
26 | ||
27 | exec { '/usr/bin/locale-gen': | |
28 | refreshonly => true, | |
29 | } | |
30 | ||
31 | ||
32 | file { "/etc/vconsole.conf": | |
33 | ensure => "link", | |
34 | target => "/dev/null", | |
35 | } | |
36 | ||
37 | } |