[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:31:31 UTC 2010


The following commit has been merged in the upstream branch:
commit 1c5b3d7d4457a7c2e643a3ac160a95f14b347397
Author: Markus Roberts <Markus at reality.com>
Date:   Wed Mar 24 15:17:04 2010 -0700

    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..957a1ae 100755
--- a/lib/puppet/provider/service/smf.rb
+++ b/lib/puppet/provider/service/smf.rb
@@ -70,13 +70,15 @@ 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
         end
 
-
         case state
         when "online"
             #self.warning "matched running %s" % line.inspect

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list