From 93906963d913774b3b581e39bfef841f42008d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Sat, 4 May 2013 12:00:06 +0300 Subject: [PATCH] Fixed puppet::client for OpenBSD 5.3. --- puppet/manifests/init.pp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/puppet/manifests/init.pp b/puppet/manifests/init.pp index 70a6ee5..af02563 100644 --- a/puppet/manifests/init.pp +++ b/puppet/manifests/init.pp @@ -68,7 +68,7 @@ class puppet::client { } case $::operatingsystem { - openbsd: { + "openbsd": { service { "puppet": name => $::operatingsystemrelease ? { /4\.[1-8]/ => "puppet", @@ -76,14 +76,26 @@ class puppet::client { }, ensure => running, enable => true, - start => "/usr/local/sbin/puppetd", - stop => "pkill -f /usr/local/sbin/puppetd", - status => "pgrep -f /usr/local/sbin/puppetd", - restart => "pkill -HUP -f /usr/local/sbin/puppetd", + start => $::operatingsystemrelease ? { + /^4\./ => "/usr/local/sbin/puppetd", + default => undef, + }, + stop => $::operatingsystemrelease ? { + /^4\./ => "pkill -f /usr/local/sbin/puppetd", + default => undef, + }, + status => $::puppetversion ? { + /^[0-2]\./ => "pgrep -f /usr/local/sbin/puppetd", + default => "pgrep -f /usr/local/bin/puppet", + }, + restart => $::puppetversion ? { + /^[0-2]\./ => "pkill -HUP -f /usr/local/sbin/puppetd", + default => "pkill -HUP -f /usr/local/bin/puppet", + }, subscribe => File["/etc/puppet/puppet.conf"], } } - debian,ubuntu: { + "debian","ubuntu": { service { "puppet": ensure => running, enable => true,