Merge remote-tracking branch 'tmakinen/master'

This commit is contained in:
Ossi Salmi 2017-02-22 14:44:34 +02:00
commit e5b37b9de5
4 changed files with 73 additions and 41 deletions

View file

@ -171,13 +171,24 @@ class firewall::common::iptables {
require => Package["iptables"], require => Package["iptables"],
notify => Service["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": service { "iptables":
ensure => running, ensure => running,
name => $::operatingsystem ? { name => $service,
"debian" => "iptables-persistent",
"ubuntu" => "iptables-persistent",
default => "iptables",
},
alias => $::operatingsystem ? { alias => $::operatingsystem ? {
"debian" => "ip6tables", "debian" => "ip6tables",
"ubuntu" => "ip6tables", "ubuntu" => "ip6tables",

View file

@ -11,32 +11,46 @@ class lynx {
$www_default_url = "http://www.${::domain}" $www_default_url = "http://www.${::domain}"
} }
if $::operatingsystem != "OpenBSD" { case $::operatingsystem {
package { "lynx": "openbsd": {
ensure => installed,
name => $::operatingsystem ? {
"ubuntu" => "lynx-cur",
default => "lynx",
},
before => File["/usr/local/bin/html2text"],
}
}
if $::operatingsystem == "OpenBSD" {
exec { "add-local-lynx-config": exec { "add-local-lynx-config":
command => "echo 'INCLUDE:/etc/lynx-site.cfg' >> /etc/lynx.cfg", command => "echo 'INCLUDE:/etc/lynx-site.cfg' >> /etc/lynx.cfg",
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
user => root, user => "root",
unless => "fgrep 'INCLUDE:/etc/lynx-site.cfg' /etc/lynx.cfg", 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 $package {
package { "lynx":
ensure => installed,
name => $package,
before => [
File["/usr/local/bin/html2text"],
File["lynx-site.cfg"],
],
}
} }
file { "lynx-site.cfg": file { "lynx-site.cfg":
ensure => present, ensure => present,
name => $::operatingsystem ? { name => $config,
"ubuntu" => "/etc/lynx-cur/local.cfg",
default => "/etc/lynx-site.cfg",
},
content => template("lynx/lynx-site.cfg.erb"), content => template("lynx/lynx-site.cfg.erb"),
mode => "0644", mode => "0644",
owner => "root", owner => "root",
@ -44,10 +58,6 @@ class lynx {
"openbsd" => "wheel", "openbsd" => "wheel",
default => "root", default => "root",
}, },
require => $::operatingsystem ? {
"openbsd" => undef,
default => Package["lynx"],
},
} }
file { "/usr/local/bin/html2text": file { "/usr/local/bin/html2text":

View file

@ -13,12 +13,24 @@ class nfs::client {
} }
case $::operatingsystem { case $::operatingsystem {
"centos", "redhat": {
if versioncmp($::operatingsystemrelease, "7") < 0 {
$service = "nfslock"
} else {
$service = "rpc-statd"
}
}
"fedora": { "fedora": {
# https://bugzilla.redhat.com/show_bug.cgi?id=692008 # https://bugzilla.redhat.com/show_bug.cgi?id=692008
service { "NetworkManager-wait-online": service { "NetworkManager-wait-online":
ensure => stopped, ensure => stopped,
enable => true, enable => true,
} }
if versioncmp($::operatingsystemrelease, "16") < 0 {
$service = "nfslock"
} else {
$service = "rpc-statd"
}
} }
"ubuntu": { "ubuntu": {
file { "/etc/modprobe.d/lockd.conf": file { "/etc/modprobe.d/lockd.conf":
@ -35,25 +47,24 @@ class nfs::client {
notify => Service["nfslock"], notify => Service["nfslock"],
require => Package["nfs-utils"], 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": service { "nfslock":
ensure => running, ensure => running,
enable => true, enable => true,
name => $::operatingsystem ? { name => $service,
"centos" => $::operatingsystemrelease ? {
/^[1-6]/ => "nfslock",
default => "rpc-statd",
},
"fedora" => $::operatingsystemrelease ? {
/^([1-9]|1[0-5])$/ => "nfslock",
default => "nfs-lock",
},
"ubuntu" => "statd",
default => "nfslock",
},
hasstatus => true, hasstatus => true,
require => Package["nfs-utils"], require => Package["nfs-utils"],
} }

View file

@ -1,6 +1,6 @@
include $(CURDIR)/../Makefile.inc include $(CURDIR)/../Makefile.inc
VERSION = 0.10.19 VERSION = 1.0.5
URL = https://updates.tdesktop.com/tlinux/tsetup.$(VERSION).tar.xz URL = https://updates.tdesktop.com/tlinux/tsetup.$(VERSION).tar.xz
PACKAGE = tsetup.$(VERSION).tar.xz PACKAGE = tsetup.$(VERSION).tar.xz