components/puppet/patches/puppet-06-provider-smf.patch
author Virginia Wray <virginia.wray@oracle.com>
Mon, 23 Sep 2013 10:03:20 -0700
branchs11-update
changeset 2771 8e4227dc2fc4
child 2928 43b3da52b84a
permissions -rw-r--r--
16453463 Update Puppet's offerings on Solaris 16979551 Update Puppet to 3.2.2 17242868 Need to set the start method for the Puppet service to default to disabled. 17243548 The puppet.xml template entry needs updating 17257851 nameservice resource types need to stop calling svccfg refresh so much 17263808 Unable to initialize LDAP configuration using profile name 17263843 LDAP parameters do not match expected parameters 17270555 NIS provider returns an error when attempting to set securenets parameter 17271383 NIS provider is not updating domainname property 17277145 nsswitch provider object error and missing parameter 17284016 nis, ldap, and dns refreshed on every Puppet run 17284583 puppet service needs dependency on identity:node 17307127 LDAP provider has an invalid parameter. 17307412 clobber/clean can fail in puppet/ext 17318366 Update Puppet to 3.2.4 17318398 problem in UTILITY/PUPPET

Add check for existence of smf service
--- puppet-3.2.4/lib/puppet/provider/service/smf.rb.orig	2013-07-15 09:23:24.667341073 -0600
+++ puppet-3.2.4/lib/puppet/provider/service/smf.rb	2013-07-15 10:13:03.196178924 -0600
@@ -80,9 +80,18 @@
       return
     end
 
+    # get the current state and the next state, and if the next
+    # state is set (i.e. not "-") use it for state comparison
+
+    # Check to see if the service exists
+    cmd = Array[command(:svccfg), "select", @resource[:name]]
+    output = Puppet::Util::Execution.execute(
+        cmd, :combine => true, :failonfail => false)
+    if $CHILD_STATUS.exitstatus != 0
+      info output
+    end
+
     begin
-      # 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