Fixed puppetd service for older OpenBSD versions

This commit is contained in:
Ossi Salmi 2011-11-29 22:34:52 +02:00 committed by Timo Mkinen
parent 385cbeeb5a
commit e43512adad

View file

@ -47,17 +47,16 @@ class puppet::client {
case $operatingsystem { case $operatingsystem {
openbsd: { openbsd: {
service { "puppet": service { "puppet":
name => "puppetd", name => $operatingsystemrelease ? {
/4\.[1-8]/ => "puppet",
default => "puppetd",
},
ensure => running, ensure => running,
enable => true, enable => true,
start => $operatingsystemrelease ? { start => "/usr/local/sbin/puppetd",
/4\.[1-6]/ => "/usr/local/bin/puppetd", stop => "pkill -f /usr/local/sbin/puppetd",
default => "/usr/local/sbin/puppetd", status => "pgrep -f /usr/local/sbin/puppetd",
}, restart => "pkill -HUP -f /usr/local/sbin/puppetd",
restart => $operatingsystemrelease ? {
/4\.[1-6]/ => "/usr/bin/pkill -HUP -f /usr/local/bin/puppetd",
default => "/usr/bin/pkill -HUP -f /usr/local/sbin/puppetd",
},
subscribe => File["/etc/puppet/puppet.conf"], subscribe => File["/etc/puppet/puppet.conf"],
} }
} }