1888N/AAdd check for existence of smf service
5858N/A+#######################################################################
5858N/A+# Oracle has modified the originally distributed contents of this file.
5858N/A+#######################################################################
5858N/A # Solaris 10 SMF-style services.
1888N/A+ # get the current state and the next state, and if the next
1888N/A+ # state is set (
i.e. not "-") use it for state comparison
1888N/A+ # Check to see if the service exists
1888N/A+ cmd = Array[command(:svccfg), "select", @resource[:name]]
1888N/A+ cmd, :combine => true, :failonfail => false)
1888N/A- # get the current state and the next state, and if the next
1888N/A- # state is set (
i.e. not "-") use it for state comparison
1888N/A state = states[1] == "-" ? states[0] : states[1]
1888N/A rescue Puppet::ExecutionFailure