summaryrefslogtreecommitdiff
path: root/manifests/common.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/common.pp')
-rw-r--r--manifests/common.pp48
1 files changed, 8 insertions, 40 deletions
diff --git a/manifests/common.pp b/manifests/common.pp
index 7d9fa61..94538a6 100644
--- a/manifests/common.pp
+++ b/manifests/common.pp
@@ -9,14 +9,15 @@ class profiles::common (
include "profiles::common::${os_fam}"
}
- file { '/etc/hostname':
- content => "${::hostname}\n",
+ $kernel = $facts['kernel'].downcase()
+ if defined("profiles::common::kernel_${kernel}") {
+ include "profiles::common::kernel_${kernel}"
}
file_line { 'hosts ourself':
ensure => present,
- line => "::1\t${::fqdn}\t${::hostname}",
- match => $::fqdn,
+ line => "::1\t${facts['fqdn']}\t${facts['hostname']}",
+ match => $facts['fqdn'],
path => '/etc/hosts',
}
@@ -31,32 +32,15 @@ class profiles::common (
})
}
- # TODO possibly check in /usr/share/i18n/locales if file exists
- # there
-
- $fixed_locales = ($locales.map |$locale| {
- if $locale =~ /^[^.]*\.(.*)$/ {
- "${locale} ${1}"
- } else {
- "${locale} UTF-8"
- }
- } + [ '' ])
-
- # TODO figure out proper test here
- unless $facts['operatingsystem'] == 'FreeBSD' {
- file { '/etc/locale.gen':
- content => $fixed_locales.join("\n")
- } ~> exec { 'locale-gen':
- path => [ '/bin', '/usr/bin', '/usr/sbin', ],
- refreshonly => true,
- }
- }
file { 'Default locales':
path => '/etc/locale.conf',
content => @(EOF)
LANG=en_US.UTF-8
LC_TIME=sv_SE.UTF-8
+ LC_MEASURMENT=sv_SE.UTF-8
+ LC_PAPER=sv_SE.UTF-8
+ LC_TELEPHONE=sv_SE.UTF-8
| EOF
}
@@ -76,20 +60,4 @@ class profiles::common (
])
ensure_packages(['nano'], { ensure => absent })
-
- unless $facts['operatingsystem'] == 'FreeBSD' {
- file { '/etc/ld.so.conf.d/usr-local.conf':
- content => "/usr/local/lib\n",
- }
- }
-
- unless $facts['operatingsystem'] == 'FreeBSD' {
- # 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',
- ])
- }
- }
}