diff options
| author | Max Martin <max@puppetlabs.com> | 2011-03-30 13:01:46 -0700 |
|---|---|---|
| committer | Max Martin <max@puppetlabs.com> | 2011-03-30 13:01:46 -0700 |
| commit | 11309a214148abb2167c1bd0adba0e035b2d8384 (patch) | |
| tree | bfd37ac5887307857d0b0d79a1db034010eed424 /lib/puppet | |
| parent | 9290b2f990fd4b267b2eb0da719b8f320484c4d7 (diff) | |
| parent | 9d17809e5b240aa80d2c30f4d9625d4812802b8f (diff) | |
| download | puppet-11309a214148abb2167c1bd0adba0e035b2d8384.tar.gz puppet-11309a214148abb2167c1bd0adba0e035b2d8384.tar.xz puppet-11309a214148abb2167c1bd0adba0e035b2d8384.zip | |
Merge branch '2.6.x' into next
* 2.6.x:
(#5908) Add support for new update-rc.d disable API
(#6862) Add a default subject for the mail_patches rake task
Fixed #6256 - Creation of rrd directory.
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/application/master.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/defaults.rb | 1 | ||||
| -rwxr-xr-x | lib/puppet/provider/service/debian.rb | 8 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb index 3bfad89f4..78499a92a 100644 --- a/lib/puppet/application/master.rb +++ b/lib/puppet/application/master.rb @@ -222,7 +222,7 @@ License exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs? - Puppet.settings.use :main, :master, :ssl + Puppet.settings.use :main, :master, :ssl, :metrics # Cache our nodes in yaml. Currently not configurable. Puppet::Node.indirection.cache_class = :yaml diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index f308d4476..989ef3f35 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -474,6 +474,7 @@ module Puppet setdefaults(:metrics, :rrddir => {:default => "$vardir/rrd", + :mode => 0750, :owner => "service", :group => "service", :desc => "The directory where RRD database files are stored. diff --git a/lib/puppet/provider/service/debian.rb b/lib/puppet/provider/service/debian.rb index 3d09e2849..58b808a8e 100755 --- a/lib/puppet/provider/service/debian.rb +++ b/lib/puppet/provider/service/debian.rb @@ -22,8 +22,12 @@ Puppet::Type.type(:service).provide :debian, :parent => :init do # Remove the symlinks def disable - update_rc "-f", @resource[:name], "remove" - update_rc @resource[:name], "stop", "00", "1", "2", "3", "4", "5", "6", "." + if `dpkg --compare-versions $(dpkg-query -W --showformat '${Version}' sysv-rc) ge 2.88 ; echo $?`.to_i == 0 + update_rc @resource[:name], "disable" + else + update_rc "-f", @resource[:name], "remove" + update_rc @resource[:name], "stop", "00", "1", "2", "3", "4", "5", "6", "." + end end def enabled? |
