diff options
Diffstat (limited to 'manifests/common/kernel_linux.pp')
-rw-r--r-- | manifests/common/kernel_linux.pp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/manifests/common/kernel_linux.pp b/manifests/common/kernel_linux.pp new file mode 100644 index 0000000..388a38f --- /dev/null +++ b/manifests/common/kernel_linux.pp @@ -0,0 +1,37 @@ +class profiles::common::kernel_linux ( +) { + file { '/etc/hostname': + content => "${::hostname}\n", + } + + # TODO possibly check in /usr/share/i18n/locales if file exists + # there + + $fixed_locales = ($profiles::common::locales.map |$locale| { + if $locale =~ /^[^.]*\.(.*)$/ { + "${locale} ${1}" + } else { + "${locale} UTF-8" + } + } + [ '' ]) + + file { '/etc/locale.gen': + content => $fixed_locales.join("\n") + } ~> exec { 'locale-gen': + path => [ '/bin', '/usr/bin', '/usr/sbin', ], + refreshonly => true, + } + + file { '/etc/ld.so.conf.d/usr-local.conf': + content => "/usr/local/lib\n", + } + + + # If a btrfs filesystem is detected, install userspace utilities. + if $facts['filesystems'] and $facts['filesystems'] =~ 'btrfs' { + ensure_packages([ + # Package name checked for Archlinux + 'btrfs-progs', + ]) + } +} |