oidentd: Add support for OpenBSD
This commit is contained in:
parent
8653c7d02d
commit
76e04b14d1
2 changed files with 32 additions and 8 deletions
10
oidentd/files/oidentd.rc
Normal file
10
oidentd/files/oidentd.rc
Normal 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
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Install oidentd service
|
||||
#
|
||||
# === Parameters:
|
||||
|
@ -6,7 +5,7 @@
|
|||
# $config:
|
||||
# Source to oidentd.conf. Default is to install empty config.
|
||||
#
|
||||
class oidentd($config="") {
|
||||
class oidentd($config=undef) {
|
||||
|
||||
package { "oidentd":
|
||||
ensure => installed,
|
||||
|
@ -14,24 +13,39 @@ class oidentd($config="") {
|
|||
|
||||
file { "/etc/oidentd.conf":
|
||||
ensure => present,
|
||||
source => $config ? {
|
||||
"" => undef,
|
||||
default => $config,
|
||||
},
|
||||
source => $config,
|
||||
content => $config ? {
|
||||
"" => "",
|
||||
undef => "",
|
||||
default => undef,
|
||||
},
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
require => Package["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":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
start => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/local/sbin/oidentd -e -u _identd -g _identd",
|
||||
default => undef,
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue