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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     1
Add check for existence of smf service
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     2
--- puppet-3.2.4/lib/puppet/provider/service/smf.rb.orig	2013-07-15 09:23:24.667341073 -0600
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     3
+++ puppet-3.2.4/lib/puppet/provider/service/smf.rb	2013-07-15 10:13:03.196178924 -0600
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     4
@@ -80,9 +80,18 @@
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     5
       return
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     6
     end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     7
 
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     8
+    # get the current state and the next state, and if the next
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     9
+    # state is set (i.e. not "-") use it for state comparison
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    10
+
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    11
+    # Check to see if the service exists
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    12
+    cmd = Array[command(:svccfg), "select", @resource[:name]]
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    13
+    output = Puppet::Util::Execution.execute(
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    14
+        cmd, :combine => true, :failonfail => false)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    15
+    if $CHILD_STATUS.exitstatus != 0
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    16
+      info output
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    17
+    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    18
+
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    19
     begin
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    20
-      # get the current state and the next state, and if the next
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    21
-      # state is set (i.e. not "-") use it for state comparison
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    22
       states = svcs("-H", "-o", "state,nstate", @resource[:name]).chomp.split
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    23
       state = states[1] == "-" ? states[0] : states[1]
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    24
     rescue Puppet::ExecutionFailure