0001-Fixing-2767-invoke-rc.d-warnings.patch

Jesse Wolfe, 11/11/2009 12:51 pm

Download (2.1 kB)

b/lib/puppet/provider/service/debian.rb
29 29
    def enabled?
30 30
        # TODO: Replace system() call when Puppet::Util.execute gives us a way
31 31
        # to determine exit status.  http://projects.reductivelabs.com/issues/2538
32
        system("/usr/sbin/invoke-rc.d", "--query", @resource[:name], "start")
32
        system("/usr/sbin/invoke-rc.d", "--quiet", "--query", @resource[:name], "start")
33 33
        
34 34
        # 104 is the exit status when you query start an enabled service.
35 35
        # 106 is the exit status when the policy layer supplies a fallback action
b/spec/unit/provider/service/debian.rb
60 60
    
61 61
    describe "when checking whether it is enabled" do
62 62
        it "should call Kernel.system() with the appropriate parameters" do
63
            @provider.expects(:system).with("/usr/sbin/invoke-rc.d", "--query", @resource[:name], "start").once
63
            @provider.expects(:system).with("/usr/sbin/invoke-rc.d", "--quiet", "--query", @resource[:name], "start").once
64 64
            @provider.enabled?
65 65
        end
66 66
        
67
-