Removed support for OpenBSD < 4.9
This commit is contained in:
parent
93906963d9
commit
e8b2422265
7 changed files with 55 additions and 223 deletions
|
@ -13,8 +13,8 @@ class cups::client {
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => root,
|
owner => root,
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
openbsd => wheel,
|
"openbsd" => "wheel",
|
||||||
default => lp,
|
default => "lp",
|
||||||
},
|
},
|
||||||
require => Package["cups"],
|
require => Package["cups"],
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,7 @@ class cups::client {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
"openbsd": {
|
"openbsd": {
|
||||||
exec { "cups-enable":
|
exec { "cups-enable":
|
||||||
command => $::operatingsystemrelease ? {
|
command => "sh -c '. /etc/rc.d/cupsd check ; rc_pre'",
|
||||||
/4\.[1-8]/ => "echo y | cups-enable",
|
|
||||||
default => "sh -c '. /etc/rc.d/cupsd check ; rc_pre'",
|
|
||||||
},
|
|
||||||
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",
|
||||||
creates => "/usr/bin/lpr.pre-cups",
|
creates => "/usr/bin/lpr.pre-cups",
|
||||||
|
|
|
@ -4,9 +4,7 @@ Puppet::Type.type(:service).provide :openbsd, :parent => :base do
|
||||||
|
|
||||||
desc "OpenBSD service management."
|
desc "OpenBSD service management."
|
||||||
|
|
||||||
version = ["4.9", "5.0", "5.1", "5.2", "5.3"]
|
|
||||||
confine :operatingsystem => :openbsd
|
confine :operatingsystem => :openbsd
|
||||||
confine :operatingsystemrelease => version
|
|
||||||
defaultfor :operatingsystem => :openbsd
|
defaultfor :operatingsystem => :openbsd
|
||||||
|
|
||||||
def rc_dir() '/etc/rc.d' end
|
def rc_dir() '/etc/rc.d' end
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
# Manage OpenBSD services. Enable/disable using /etc/rc.local, /etc/rc.conf.local
|
|
||||||
|
|
||||||
Puppet::Type.type(:service).provide :openbsd_old, :parent => :base do
|
|
||||||
|
|
||||||
desc "OpenBSD service management."
|
|
||||||
|
|
||||||
version = ["4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8"]
|
|
||||||
confine :operatingsystem => :openbsd
|
|
||||||
confine :operatingsystemrelease => version
|
|
||||||
defaultfor :operatingsystem => :openbsd
|
|
||||||
|
|
||||||
def rclocal() '/etc/rc.local' end
|
|
||||||
def rcconf() '/etc/rc.conf' end
|
|
||||||
def rcconflocal() '/etc/rc.conf.local' end
|
|
||||||
|
|
||||||
def getrcconf
|
|
||||||
File.readlines(rcconf).each { |line|
|
|
||||||
if line =~ /^#{@resource[:name]}_flags=.*/
|
|
||||||
return "#{@resource[:name]}_flags"
|
|
||||||
elsif line =~ /^#{@resource[:name]}=.*/
|
|
||||||
return @resource[:name]
|
|
||||||
end
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
def enabled?
|
|
||||||
if not defined? @resource[:start]
|
|
||||||
raise Puppet::Error,
|
|
||||||
"Services must specify a start command or a binary"
|
|
||||||
end
|
|
||||||
flag = getrcconf()
|
|
||||||
if flag
|
|
||||||
File.readlines(rcconflocal).each { |line|
|
|
||||||
line = line.strip.split(/=/, 2)
|
|
||||||
next unless line[0] == flag
|
|
||||||
if line[1] == "NO"
|
|
||||||
return :false
|
|
||||||
end
|
|
||||||
return :true
|
|
||||||
}
|
|
||||||
return :false
|
|
||||||
else
|
|
||||||
inlocal = false
|
|
||||||
File.readlines(rclocal).each { |line|
|
|
||||||
line = line.strip
|
|
||||||
if not inlocal
|
|
||||||
next unless \
|
|
||||||
line == "# Add your local startup actions here."
|
|
||||||
inlocal = true
|
|
||||||
else
|
|
||||||
if line == "echo '.'"
|
|
||||||
inlocal = false
|
|
||||||
break
|
|
||||||
end
|
|
||||||
next unless line =~ /^echo -n \" #{@resource[:name]}\" ; .*/
|
|
||||||
return :true
|
|
||||||
end
|
|
||||||
}
|
|
||||||
return :false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def enable
|
|
||||||
flag = getrcconf()
|
|
||||||
if flag
|
|
||||||
newdata = ""
|
|
||||||
File.readlines(rcconflocal).each { |line|
|
|
||||||
if line.strip.split(/=/, 2)[0] == flag
|
|
||||||
next
|
|
||||||
else
|
|
||||||
newdata += line
|
|
||||||
end
|
|
||||||
}
|
|
||||||
if flag == @resource[:name]
|
|
||||||
newdata += "%s=YES\n" % flag
|
|
||||||
elsif flag == "#{@resource[:name]}_flags"
|
|
||||||
if @resource[:start] != nil and @resource[:binary] != nil
|
|
||||||
args = @resource[:start][/^#{@resource[:binary]} (.*)/, 1]
|
|
||||||
end
|
|
||||||
newdata += "%s=\"%s\"\n" % [flag, args]
|
|
||||||
end
|
|
||||||
f = File.open(rcconflocal, "w")
|
|
||||||
f.write(newdata)
|
|
||||||
f.close
|
|
||||||
else
|
|
||||||
newdata = ""
|
|
||||||
inlocal = false
|
|
||||||
File.readlines(rclocal).each { |line|
|
|
||||||
if line == "# Add your local startup actions here.\n"
|
|
||||||
newdata += line
|
|
||||||
newdata += "echo -n \" %s\" ; %s\n" % [@resource[:name],
|
|
||||||
@resource[:start]]
|
|
||||||
next
|
|
||||||
end
|
|
||||||
newdata += line
|
|
||||||
}
|
|
||||||
f = File.open(rclocal, "w")
|
|
||||||
f.write(newdata)
|
|
||||||
f.close
|
|
||||||
end
|
|
||||||
return :true
|
|
||||||
end
|
|
||||||
|
|
||||||
def disable
|
|
||||||
flag = getrcconf()
|
|
||||||
if flag
|
|
||||||
newdata = ""
|
|
||||||
File.readlines(rcconflocal).each { |line|
|
|
||||||
if line.strip.split(/=/, 2)[0] == flag
|
|
||||||
next
|
|
||||||
else
|
|
||||||
newdata += line
|
|
||||||
end
|
|
||||||
}
|
|
||||||
if flag == @resource[:name] or flag == "#{@resource[:name]}_flags"
|
|
||||||
newdata += "%s=NO\n" % flag
|
|
||||||
end
|
|
||||||
f = File.open(rcconflocal, "w")
|
|
||||||
f.write(newdata)
|
|
||||||
f.close
|
|
||||||
else
|
|
||||||
print "disabling services from rc.local not implemented\n"
|
|
||||||
end
|
|
||||||
return :true
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -27,38 +27,38 @@ class dhcp::server::common {
|
||||||
|
|
||||||
package { "dhcp":
|
package { "dhcp":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
Debian => "dhcp3-server",
|
"debian" => "dhcp3-server",
|
||||||
OpenBSD => "isc-dhcp-server",
|
"ubuntu" => "dhcp3-server",
|
||||||
Ubuntu => "dhcp3-server",
|
"openbsd" => "isc-dhcp-server",
|
||||||
default => "dhcp",
|
default => "dhcp",
|
||||||
},
|
},
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "dhcpd.leases":
|
file { "dhcpd.leases":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
Debian => "/var/lib/dhcp3/dhcpd.leases",
|
"debian" => "/var/lib/dhcp3/dhcpd.leases",
|
||||||
OpenBSD => "/var/db/dhcpd.leases",
|
"ubuntu" => "/var/lib/dhcp3/dhcpd.leases",
|
||||||
Ubuntu => "/var/lib/dhcp3/dhcpd.leases",
|
"openbsd" => "/var/db/dhcpd.leases",
|
||||||
default => "/var/lib/dhcpd/dhcpd.leases",
|
default => "/var/lib/dhcpd/dhcpd.leases",
|
||||||
},
|
},
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => $::operatingsystem ? {
|
owner => $::operatingsystem ? {
|
||||||
debian => dhcpd,
|
"debian" => "dhcpd",
|
||||||
ubuntu => dhcpd,
|
"ubuntu" => "dhcpd",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
Debian => dhcpd,
|
"debian" => "dhcpd",
|
||||||
OpenBSD => wheel,
|
"ubuntu" => "dhcpd",
|
||||||
Ubuntu => dhcpd,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
require => Package["dhcp"],
|
require => Package["dhcp"],
|
||||||
before => Service["dhcpd"],
|
before => Service["dhcpd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::operatingsystem == "OpenBSD" and $::operatingsystemrelease !~ /4\.[1-8]/ {
|
if $::operatingsystem == "OpenBSD" {
|
||||||
file { "/etc/rc.d/isc_dhcpd":
|
file { "/etc/rc.d/isc_dhcpd":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => "0555",
|
mode => "0555",
|
||||||
|
@ -71,26 +71,23 @@ class dhcp::server::common {
|
||||||
|
|
||||||
service { "dhcpd":
|
service { "dhcpd":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
Debian => "dhcp3-server",
|
"debian" => "dhcp3-server",
|
||||||
OpenBSD => $::operatingsystemrelease ? {
|
"ubuntu" => "dhcp3-server",
|
||||||
/4\.[1-8]/ => "isc-dhcpd",
|
"openbsd" => "isc_dhcpd",
|
||||||
default => "isc_dhcpd",
|
default => "dhcpd",
|
||||||
},
|
|
||||||
Ubuntu => "dhcp3-server",
|
|
||||||
default => "dhcpd",
|
|
||||||
},
|
},
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
binary => $::operatingsystem ? {
|
binary => $::operatingsystem ? {
|
||||||
OpenBSD => "/usr/local/sbin/dhcpd",
|
"openbsd" => "/usr/local/sbin/dhcpd",
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
start => $::operatingsystem ? {
|
start => $::operatingsystem ? {
|
||||||
OpenBSD => $dhcp_server_interface ? {
|
"openbsd" => $dhcp_server_interface ? {
|
||||||
"" => "/usr/local/sbin/dhcpd -q",
|
"" => "/usr/local/sbin/dhcpd -q",
|
||||||
default => "/usr/local/sbin/dhcpd -q ${dhcp_server_interface}",
|
default => "/usr/local/sbin/dhcpd -q ${dhcp_server_interface}",
|
||||||
},
|
},
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
require => Package["dhcp"],
|
require => Package["dhcp"],
|
||||||
}
|
}
|
||||||
|
@ -132,10 +129,10 @@ class dhcp::server inherits dhcp::server::common {
|
||||||
source => [ "puppet:///files/dhcp/dhcpd.conf.${fqdn}",
|
source => [ "puppet:///files/dhcp/dhcpd.conf.${fqdn}",
|
||||||
"puppet:///files/dhcp/dhcpd.conf", ],
|
"puppet:///files/dhcp/dhcpd.conf", ],
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
openbsd => wheel,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
notify => Service["dhcpd"],
|
notify => Service["dhcpd"],
|
||||||
}
|
}
|
||||||
|
@ -159,10 +156,10 @@ class dhcp::server::ldap inherits dhcp::server::common {
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => "puppet:///modules/dhcp/dhcpdump.py",
|
source => "puppet:///modules/dhcp/dhcpdump.py",
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
OpenBSD => wheel,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,10 +169,10 @@ class dhcp::server::ldap inherits dhcp::server::common {
|
||||||
source => [ "puppet:///files/dhcp/dhcpd.conf.in.${hostname}",
|
source => [ "puppet:///files/dhcp/dhcpd.conf.in.${hostname}",
|
||||||
"puppet:///files/dhcp/dhcpd.conf.in", ],
|
"puppet:///files/dhcp/dhcpd.conf.in", ],
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
OpenBSD => wheel,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
require => Package["dhcp"],
|
require => Package["dhcp"],
|
||||||
}
|
}
|
||||||
|
@ -211,18 +208,18 @@ class dhcp::server::ldap inherits dhcp::server::common {
|
||||||
# dhcp::relay { "relay0": interface => "em2", server_addr => "10.20.110.11" }
|
# dhcp::relay { "relay0": interface => "em2", server_addr => "10.20.110.11" }
|
||||||
#
|
#
|
||||||
|
|
||||||
define dhcp::relay ($interface, $server_addr) {
|
define dhcp::relay($interface, $server_addr) {
|
||||||
|
|
||||||
service { $name:
|
service { $name:
|
||||||
name => $name,
|
|
||||||
ensure => running,
|
ensure => running,
|
||||||
provider => "base",
|
provider => "base",
|
||||||
hasrestart => false,
|
hasrestart => false,
|
||||||
hasstatus => false,
|
hasstatus => false,
|
||||||
pattern => "/usr/sbin/dhcrelay -i ${interface} ${server_addr}",
|
pattern => "/usr/sbin/dhcrelay -i ${interface} ${server_addr}",
|
||||||
start => $::operatingsystem ? {
|
start => $::operatingsystem ? {
|
||||||
OpenBSD => "/usr/sbin/dhcrelay -i ${interface} ${server_addr}",
|
"openbsd" => "/usr/sbin/dhcrelay -i ${interface} ${server_addr}",
|
||||||
default => undef,
|
default => undef,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -9,26 +9,12 @@ class munin::node {
|
||||||
|
|
||||||
service { "munin-node":
|
service { "munin-node":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
OpenBSD => $::operatingsystemrelease ? {
|
"openbsd" => "munin_node",
|
||||||
/4\.[1-8]/ => "munin-node",
|
default => "munin-node",
|
||||||
default => "munin_node",
|
|
||||||
},
|
|
||||||
default => "munin-node",
|
|
||||||
},
|
},
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
require => Package["munin-node"],
|
require => Package["munin-node"],
|
||||||
start => $::operatingsystem ? {
|
|
||||||
OpenBSD => $::operatingsystemrelease ? {
|
|
||||||
/4\.[1-8]/ => "/usr/bin/install -d -o _munin /var/run/munin; /usr/local/sbin/munin-node",
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
stop => $::operatingsystem ? {
|
|
||||||
OpenBSD => "/usr/bin/pkill -f /usr/local/sbin/munin-node",
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/munin/munin-node.conf":
|
file { "/etc/munin/munin-node.conf":
|
||||||
|
@ -56,7 +42,7 @@ class munin::node {
|
||||||
exec { "munin-node-configure":
|
exec { "munin-node-configure":
|
||||||
command => "munin-node-configure --shell --remove-also 2>/dev/null | /bin/sh",
|
command => "munin-node-configure --shell --remove-also 2>/dev/null | /bin/sh",
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||||
user => root,
|
user => "root",
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
notify => Service["munin-node"],
|
notify => Service["munin-node"],
|
||||||
}
|
}
|
||||||
|
@ -99,10 +85,10 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") {
|
||||||
file { "/etc/munin/plugin-conf.d/snmp_${name}":
|
file { "/etc/munin/plugin-conf.d/snmp_${name}":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => "[snmp_${name}_*]\nenv.community ${snmp_community}\nenv.version ${snmp_version}\n",
|
content => "[snmp_${name}_*]\nenv.community ${snmp_community}\nenv.version ${snmp_version}\n",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
OpenBSD => wheel,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
mode => "0600",
|
mode => "0600",
|
||||||
notify => Service["munin-node"],
|
notify => Service["munin-node"],
|
||||||
|
@ -165,14 +151,14 @@ define munin::plugin($config = "") {
|
||||||
"puppet:///modules/munin/plugin-conf/${config}", ],
|
"puppet:///modules/munin/plugin-conf/${config}", ],
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
OpenBSD => wheel,
|
"openbsd" => "wheel",
|
||||||
default => root,
|
default => "root",
|
||||||
},
|
},
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
notify => Service["munin-node"],
|
notify => Service["munin-node"],
|
||||||
require => $::operatingsystem ? {
|
require => $::operatingsystem ? {
|
||||||
OpenBSD => File["/usr/local/libexec/munin/plugins/${name}"],
|
"openbsd" => File["/usr/local/libexec/munin/plugins/${name}"],
|
||||||
default => File["/usr/share/munin/plugins/${name}"],
|
default => File["/usr/share/munin/plugins/${name}"],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +168,7 @@ define munin::plugin($config = "") {
|
||||||
exec { "munin-enable-${name}":
|
exec { "munin-enable-${name}":
|
||||||
command => "ln -s /usr/local/libexec/munin/plugins/${name} /etc/munin/plugins/${name}",
|
command => "ln -s /usr/local/libexec/munin/plugins/${name} /etc/munin/plugins/${name}",
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
user => root,
|
user => "root",
|
||||||
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
|
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
|
||||||
"/usr/local/libexec/munin/plugins/${name} autoconf", ],
|
"/usr/local/libexec/munin/plugins/${name} autoconf", ],
|
||||||
notify => Service["munin-node"],
|
notify => Service["munin-node"],
|
||||||
|
@ -193,7 +179,7 @@ define munin::plugin($config = "") {
|
||||||
exec { "munin-enable-${name}":
|
exec { "munin-enable-${name}":
|
||||||
command => "ln -s /usr/share/munin/plugins/${name} /etc/munin/plugins/${name}",
|
command => "ln -s /usr/share/munin/plugins/${name} /etc/munin/plugins/${name}",
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
user => root,
|
user => "root",
|
||||||
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
|
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
|
||||||
"/usr/share/munin/plugins/${name} autoconf", ],
|
"/usr/share/munin/plugins/${name} autoconf", ],
|
||||||
notify => Service["munin-node"],
|
notify => Service["munin-node"],
|
||||||
|
|
|
@ -70,20 +70,9 @@ class puppet::client {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
"openbsd": {
|
"openbsd": {
|
||||||
service { "puppet":
|
service { "puppet":
|
||||||
name => $::operatingsystemrelease ? {
|
name => "puppetd",
|
||||||
/4\.[1-8]/ => "puppet",
|
|
||||||
default => "puppetd",
|
|
||||||
},
|
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
start => $::operatingsystemrelease ? {
|
|
||||||
/^4\./ => "/usr/local/sbin/puppetd",
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
stop => $::operatingsystemrelease ? {
|
|
||||||
/^4\./ => "pkill -f /usr/local/sbin/puppetd",
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
status => $::puppetversion ? {
|
status => $::puppetversion ? {
|
||||||
/^[0-2]\./ => "pgrep -f /usr/local/sbin/puppetd",
|
/^[0-2]\./ => "pgrep -f /usr/local/sbin/puppetd",
|
||||||
default => "pgrep -f /usr/local/bin/puppet",
|
default => "pgrep -f /usr/local/bin/puppet",
|
||||||
|
|
|
@ -177,13 +177,6 @@ class syslog::client::rsyslog {
|
||||||
service { "rsyslog":
|
service { "rsyslog":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
start => $::operatingsystem ? {
|
|
||||||
"openbsd" => $::operatingsystemrelease ? {
|
|
||||||
/4\.[1-8]/ => "pkill syslogd; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid",
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
default => undef,
|
|
||||||
},
|
|
||||||
hasrestart => $::operatingsystem ? {
|
hasrestart => $::operatingsystem ? {
|
||||||
"fedora" => true,
|
"fedora" => true,
|
||||||
default => false,
|
default => false,
|
||||||
|
@ -191,7 +184,7 @@ class syslog::client::rsyslog {
|
||||||
require => File["/var/log/all.log"],
|
require => File["/var/log/all.log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::operatingsystem == "OpenBSD" and $::operatingsystemrelease !~ /4\.[1-8]/ {
|
if $::operatingsystem == "OpenBSD" {
|
||||||
file { "/etc/rc.d/syslogd":
|
file { "/etc/rc.d/syslogd":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => "0555",
|
mode => "0555",
|
||||||
|
|
Loading…
Add table
Reference in a new issue