[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:07:04 UTC 2010
The following commit has been merged in the upstream branch:
commit b1722871ec27aa451be17e6fe6e099cc2f35cf7b
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Tue Nov 10 03:41:10 2009 -0800
Fixing #2767 invoke-rc.d warnings
Errors written to STDERR by Debian's invoke-rc.d are spurious, since
we're only using it to query whether a service can be started.
I'm adding the --quiet flag to suppress those messages.
Signed-off-by: Jesse Wolfe <jes5199 at gmail.com>
diff --git a/lib/puppet/provider/service/debian.rb b/lib/puppet/provider/service/debian.rb
index 7ddbd28..51fb7a2 100755
--- a/lib/puppet/provider/service/debian.rb
+++ b/lib/puppet/provider/service/debian.rb
@@ -29,7 +29,7 @@ Puppet::Type.type(:service).provide :debian, :parent => :init do
def enabled?
# TODO: Replace system() call when Puppet::Util.execute gives us a way
# to determine exit status. http://projects.reductivelabs.com/issues/2538
- system("/usr/sbin/invoke-rc.d", "--query", @resource[:name], "start")
+ system("/usr/sbin/invoke-rc.d", "--quiet", "--query", @resource[:name], "start")
# 104 is the exit status when you query start an enabled service.
# 106 is the exit status when the policy layer supplies a fallback action
diff --git a/spec/unit/provider/service/debian.rb b/spec/unit/provider/service/debian.rb
index 87d6274..ea87c37 100755
--- a/spec/unit/provider/service/debian.rb
+++ b/spec/unit/provider/service/debian.rb
@@ -60,7 +60,7 @@ describe provider_class do
describe "when checking whether it is enabled" do
it "should call Kernel.system() with the appropriate parameters" do
- @provider.expects(:system).with("/usr/sbin/invoke-rc.d", "--query", @resource[:name], "start").once
+ @provider.expects(:system).with("/usr/sbin/invoke-rc.d", "--quiet", "--query", @resource[:name], "start").once
@provider.enabled?
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list