summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-19 11:31:24 +0200
committermh <mh@immerda.ch>2010-08-19 11:31:24 +0200
commit291c1b7ebd093c421da2be7906030ce8caa2dffd (patch)
treede097e1910168eaf18334bbb635013dbd12b95b6
parent7a802f7ca1ed3884f3ec4e14290dd1aa2269f9e4 (diff)
work around a 2.6 issue
-rw-r--r--manifests/cron/base.pp12
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index 2289a3c..b30b5b3 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -10,11 +10,19 @@ class puppet::cron::base inherits puppet::base {
#it's already disabled
}
default: {
- Service['puppet']{
- hasstatus => false,
+ $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1')
+ if $puppet_majorversion == '2.6' {
+ Service['puppet']{
+ ensure => stopped,
+ }
+ } else {
+ Service['puppet']{
+ hasstatus => false,
+ }
}
}
}
+ # this works only on < 2.6
exec{'stop_puppet':
command => 'kill `cat /var/run/puppet/puppetd.pid`',
onlyif => 'test -f /var/run/puppet/puppetd.pid',