If state is running, using svcadm enable is harmless and prevents errors with
execute().

Signed-off-by: Dominic Cleal <dcl...@redhat.com>
---
Local-branch: tickets/master/6324
 lib/puppet/provider/service/smf.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/provider/service/smf.rb 
b/lib/puppet/provider/service/smf.rb
index 3efb2eb..042d339 100755
--- a/lib/puppet/provider/service/smf.rb
+++ b/lib/puppet/provider/service/smf.rb
@@ -54,10 +54,10 @@ Puppet::Type.type(:service).provide :smf, :parent => :base 
do
   def startcmd
     self.setupservice
     case self.status
-    when :stopped
-      [command(:adm), :enable, @resource[:name]]
     when :maintenance
       [command(:adm), :clear, @resource[:name]]
+    else
+      [command(:adm), :enable, @resource[:name]]
     end
   end
 
-- 
1.7.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to