oidentd: Add support for OpenBSD

This commit is contained in:
Ossi Salmi 2014-03-01 11:05:33 +02:00
parent 8653c7d02d
commit 76e04b14d1
2 changed files with 32 additions and 8 deletions

10
oidentd/files/oidentd.rc Normal file
View file

@ -0,0 +1,10 @@
#!/bin/sh
daemon="/usr/local/sbin/oidentd"
daemon_flags="-e -u _identd -g _identd"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1

View file

@ -1,4 +1,3 @@
# Install oidentd service # Install oidentd service
# #
# === Parameters: # === Parameters:
@ -6,7 +5,7 @@
# $config: # $config:
# Source to oidentd.conf. Default is to install empty config. # Source to oidentd.conf. Default is to install empty config.
# #
class oidentd($config="") { class oidentd($config=undef) {
package { "oidentd": package { "oidentd":
ensure => installed, ensure => installed,
@ -14,24 +13,39 @@ class oidentd($config="") {
file { "/etc/oidentd.conf": file { "/etc/oidentd.conf":
ensure => present, ensure => present,
source => $config ? { source => $config,
"" => undef,
default => $config,
},
content => $config ? { content => $config ? {
"" => "", undef => "",
default => undef, default => undef,
}, },
mode => "0644", mode => "0644",
owner => "root", owner => "root",
group => "root", group => $::operatingsystem ? {
"openbsd" => "wheel",
default => "root",
},
require => Package["oidentd"], require => Package["oidentd"],
notify => Service["oidentd"], notify => Service["oidentd"],
} }
if $::operatingsystem == "OpenBSD" {
file { "/etc/rc.d/oidentd":
ensure => present,
mode => "0555",
owner => "root",
group => "bin",
source => "puppet:///modules/oidentd/oidentd.rc",
before => Service["oidentd"],
}
}
service { "oidentd": service { "oidentd":
ensure => running, ensure => running,
enable => true, enable => true,
start => $::operatingsystem ? {
"openbsd" => "/usr/local/sbin/oidentd -e -u _identd -g _identd",
default => undef,
},
} }
} }