[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.4-89-gcbbd363

James Turnbull james at lovedthanlost.net
Tue May 18 09:03:54 UTC 2010


The following commit has been merged in the upstream branch:
commit 74cd55fbda7edf64b6bbd77143ea3f1fbdf39e30
Author: James Turnbull <james at lovedthanlost.net>
Date:   Wed Mar 24 09:38:05 2010 +1100

    Fixes #3113 - When importing a manifest puppet needs to chill

diff --git a/lib/puppet/provider/service/smf.rb b/lib/puppet/provider/service/smf.rb
index 0071a8c..f7f3a31 100755
--- a/lib/puppet/provider/service/smf.rb
+++ b/lib/puppet/provider/service/smf.rb
@@ -70,7 +70,10 @@ Puppet::Type.type(:service).provide :smf, :parent => :base do
         end
 
         begin
-            state = svcs("-H", "-o", "state", @resource[:name]).chomp
+            # get the current state and the next state, and if the next
+            # state is set (i.e. not "-") use it for state comparison
+            states = svcs("-H", "-o", "state,nstate", @resource[:name]).chomp.split
+            state = states[1] == "-" ? states[0] : states[1]
         rescue Puppet::ExecutionFailure
             info "Could not get status on service %s" % self.name
             return :stopped

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list