diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-18 23:39:19 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-20 02:18:10 +0200 |
commit | ee95fbc60809ecd1f615c6c109ce9bf860160bfb (patch) | |
tree | 690ffc143d20d155a039858230ab8797627beace /manifests/common.pp | |
parent | /usr/local/lib in ld.so.conf unneeded on FreeBSD. (diff) | |
download | profiles-ee95fbc60809ecd1f615c6c109ce9bf860160bfb.tar.gz profiles-ee95fbc60809ecd1f615c6c109ce9bf860160bfb.tar.xz |
Freebsd work.
Diffstat (limited to 'manifests/common.pp')
-rw-r--r-- | manifests/common.pp | 48 |
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', - ]) - } - } } |