diff --git a/firewall/manifests/init.pp b/firewall/manifests/init.pp index 7f32cc1..3ca648d 100644 --- a/firewall/manifests/init.pp +++ b/firewall/manifests/init.pp @@ -171,13 +171,24 @@ class firewall::common::iptables { require => Package["iptables"], notify => Service["iptables"], } + case $::operatingsystem { + "ubuntu": { + if versioncmp($::operatingsystemrelease, "16.04") < 0 { + $service = "iptables-persistent" + } else { + $service = "netfilter-persistent" + } + } + "debian": { + $service = "iptables-persistent" + } + default: { + $service = "iptables" + } + } service { "iptables": ensure => running, - name => $::operatingsystem ? { - "debian" => "iptables-persistent", - "ubuntu" => "iptables-persistent", - default => "iptables", - }, + name => $service, alias => $::operatingsystem ? { "debian" => "ip6tables", "ubuntu" => "ip6tables", diff --git a/lynx/manifests/init.pp b/lynx/manifests/init.pp index 70957fb..fd0b948 100644 --- a/lynx/manifests/init.pp +++ b/lynx/manifests/init.pp @@ -11,32 +11,46 @@ class lynx { $www_default_url = "http://www.${::domain}" } - if $::operatingsystem != "OpenBSD" { - package { "lynx": - ensure => installed, - name => $::operatingsystem ? { - "ubuntu" => "lynx-cur", - default => "lynx", - }, - before => File["/usr/local/bin/html2text"], + case $::operatingsystem { + "openbsd": { + exec { "add-local-lynx-config": + command => "echo 'INCLUDE:/etc/lynx-site.cfg' >> /etc/lynx.cfg", + path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", + user => "root", + unless => "fgrep 'INCLUDE:/etc/lynx-site.cfg' /etc/lynx.cfg", + } + $config = "/etc/lynx-site.cfg" + $package = undef + } + "ubuntu": { + if versioncmp($::operatingsystemrelease, "16.04") < 0 { + $config = "/etc/lynx-cur/local.cfg" + $package = "lynx-cur" + } else { + $config = "/etc/lynx/local.cfg" + $package = "lynx" + } + } + default: { + $config = "/etc/lynx-site.cfg" + $package = "lynx" } } - if $::operatingsystem == "OpenBSD" { - exec { "add-local-lynx-config": - command => "echo 'INCLUDE:/etc/lynx-site.cfg' >> /etc/lynx.cfg", - path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", - user => root, - unless => "fgrep 'INCLUDE:/etc/lynx-site.cfg' /etc/lynx.cfg", + if $package { + package { "lynx": + ensure => installed, + name => $package, + before => [ + File["/usr/local/bin/html2text"], + File["lynx-site.cfg"], + ], } } file { "lynx-site.cfg": ensure => present, - name => $::operatingsystem ? { - "ubuntu" => "/etc/lynx-cur/local.cfg", - default => "/etc/lynx-site.cfg", - }, + name => $config, content => template("lynx/lynx-site.cfg.erb"), mode => "0644", owner => "root", @@ -44,10 +58,6 @@ class lynx { "openbsd" => "wheel", default => "root", }, - require => $::operatingsystem ? { - "openbsd" => undef, - default => Package["lynx"], - }, } file { "/usr/local/bin/html2text": diff --git a/nfs/manifests/init.pp b/nfs/manifests/init.pp index 08c4cbf..0cacd8c 100644 --- a/nfs/manifests/init.pp +++ b/nfs/manifests/init.pp @@ -13,12 +13,24 @@ class nfs::client { } case $::operatingsystem { + "centos", "redhat": { + if versioncmp($::operatingsystemrelease, "7") < 0 { + $service = "nfslock" + } else { + $service = "rpc-statd" + } + } "fedora": { # https://bugzilla.redhat.com/show_bug.cgi?id=692008 service { "NetworkManager-wait-online": ensure => stopped, enable => true, } + if versioncmp($::operatingsystemrelease, "16") < 0 { + $service = "nfslock" + } else { + $service = "rpc-statd" + } } "ubuntu": { file { "/etc/modprobe.d/lockd.conf": @@ -35,25 +47,24 @@ class nfs::client { notify => Service["nfslock"], require => Package["nfs-utils"], } + if versioncmp($::operatingsystemrelease, "16.04") < 0 { + $service = "statd" + } else { + $service = "rpc-statd" + } + } + "debian": { + $service = "statd" + } + default: { + $service = "nfslock" } - default: { } } service { "nfslock": ensure => running, enable => true, - name => $::operatingsystem ? { - "centos" => $::operatingsystemrelease ? { - /^[1-6]/ => "nfslock", - default => "rpc-statd", - }, - "fedora" => $::operatingsystemrelease ? { - /^([1-9]|1[0-5])$/ => "nfslock", - default => "nfs-lock", - }, - "ubuntu" => "statd", - default => "nfslock", - }, + name => $service, hasstatus => true, require => Package["nfs-utils"], } diff --git a/telegram/Makefile b/telegram/Makefile index 7d703c8..be798b1 100644 --- a/telegram/Makefile +++ b/telegram/Makefile @@ -1,6 +1,6 @@ include $(CURDIR)/../Makefile.inc -VERSION = 0.10.19 +VERSION = 1.0.5 URL = https://updates.tdesktop.com/tlinux/tsetup.$(VERSION).tar.xz PACKAGE = tsetup.$(VERSION).tar.xz