diff --git a/oidentd/files/oidentd.rc b/oidentd/files/oidentd.rc new file mode 100644 index 0000000..0bf2695 --- /dev/null +++ b/oidentd/files/oidentd.rc @@ -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 diff --git a/oidentd/manifests/init.pp b/oidentd/manifests/init.pp index 9ab71f6..8350651 100644 --- a/oidentd/manifests/init.pp +++ b/oidentd/manifests/init.pp @@ -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, + }, } }