Fixed rsyslogd service startup and added rc script for OpenBSD 5.0
This commit is contained in:
parent
ce1e97c516
commit
5bb52a7f8c
2 changed files with 32 additions and 1 deletions
13
syslog/files/rsyslogd.rc
Executable file
13
syslog/files/rsyslogd.rc
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
daemon="/usr/local/sbin/rsyslogd"
|
||||||
|
daemon_flags="-x -c 4 -i /var/run/syslog.pid"
|
||||||
|
|
||||||
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
|
rc_pre() {
|
||||||
|
pkill -f /usr/sbin/syslogd
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_cmd $1
|
|
@ -157,11 +157,29 @@ class syslog::client::rsyslog {
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
start => $operatingsystem ? {
|
start => $operatingsystem ? {
|
||||||
"openbsd" => "pkill syslogd ; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid",
|
"openbsd" => $operatingsystemrelease ? {
|
||||||
|
/4\.[1-8]/ => "pkill syslogd; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid",
|
||||||
|
default => undef,
|
||||||
|
},
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $operatingsystem == "OpenBSD" and $operatingsystemrelease !~ /4\.[1-8]/ {
|
||||||
|
file { "/etc/rc.d/syslogd":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0555,
|
||||||
|
owner => "root",
|
||||||
|
group => "wheel",
|
||||||
|
source => "puppet:///modules/syslog/rsyslogd.rc",
|
||||||
|
backup => ".orig",
|
||||||
|
before => Service["rsyslog"],
|
||||||
|
}
|
||||||
|
Service["rsyslog"] {
|
||||||
|
name => "syslogd",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue