--- old/usr/src/cmd/acpihpd/svc-acpihpd	Tue Feb 14 13:25:52 2017
+++ new/usr/src/cmd/acpihpd/svc-acpihpd	Tue Feb 14 13:25:52 2017
@@ -23,6 +23,8 @@
 # Copyright (c) 2010, Intel Corporation.
 # All rights reserved.
 #
+# Copyright 2017 RackTop Systems.
+#
 
 . /lib/svc/share/smf_include.sh
 
@@ -32,8 +34,7 @@
 /usr/sbin/prtconf -D /devices/fw/acpidr@0 > /dev/null 2>&1
 if [ $? -ne 0 ]; then
 	svcadm disable -t $SMF_FMRI
-	sleep 5&
-	exit $SMF_EXIT_OK
+	exit $SMF_EXIT_TEMP_TRANSIENT
 fi
 
 $ACPIHPD && exit $SMF_EXIT_OK || exit $SMF_EXIT_ERR_FATAL
--- old/usr/src/cmd/ldmad/ldoms-agents	Tue Feb 14 13:25:52 2017
+++ new/usr/src/cmd/ldmad/ldoms-agents	Tue Feb 14 13:25:52 2017
@@ -24,6 +24,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2017 RackTop Systems.
+#
 
 . /lib/svc/share/smf_include.sh
 
@@ -41,8 +43,7 @@
 	echo "The $SVCNAME service has been disabled because " \
 	    "it is not supported in a local zone."
 	/usr/sbin/svcadm disable "$SMF_FMRI"
-	sleep 5 &
-	exit "$SMF_EXIT_OK"
+	exit "$SMF_EXIT_TEMP_TRANSIENT"
 fi
 
 #
@@ -60,8 +61,7 @@
 	echo "The $SVCNAME service has been disabled because the system" \
 	    "has no virtual domain service (vlds) device."
 	/usr/sbin/svcadm disable -t "$SMF_FMRI"
-	sleep 5 &
-	exit "$SMF_EXIT_OK"
+	exit "$SMF_EXIT_TEMP_TRANSIENT"
 fi
 
 if [ ! -x "$LDMAD" ]; then
--- old/usr/src/cmd/svc/shell/smf_include.sh	Tue Feb 14 13:25:52 2017
+++ new/usr/src/cmd/svc/shell/smf_include.sh	Tue Feb 14 13:25:52 2017
@@ -23,6 +23,7 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+# Copyright 2017 RackTop Systems.
 #
 
 smf_present () {
@@ -242,3 +243,4 @@
 SMF_EXIT_MON_OFFLINE=98
 SMF_EXIT_ERR_NOSMF=99
 SMF_EXIT_ERR_PERM=100
+SMF_EXIT_TEMP_TRANSIENT=101
--- old/usr/src/cmd/svc/startd/method.c	Tue Feb 14 13:25:52 2017
+++ new/usr/src/cmd/svc/startd/method.c	Tue Feb 14 13:25:52 2017
@@ -22,6 +22,7 @@
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Joyent Inc.
+ * Copyright 2017 RackTop Systems.
  */
 
 /*
@@ -179,6 +180,20 @@
 }
 
 /*
+ * int method_failed()
+ *   Return 1 if the exit_code indicates failure (not all non-zero
+ *   exit codes do) otherwise return 0.
+ */
+static int
+method_failed(int exit_code)
+{
+	if (exit_code != 0 && exit_code != SMF_EXIT_TEMP_TRANSIENT)
+		return (1);
+	else
+		return (0);
+}
+
+/*
  * void method_store_contract()
  *   Store the newly created contract id into local structures and
  *   the repository.  If the repository connection is broken it is rebound.
@@ -1018,16 +1033,24 @@
 		}
 
 		*exit_code = WEXITSTATUS(ret_status);
-		if (*exit_code != 0) {
+		if (method_failed(*exit_code) != 0) {
 			log_error(LOG_WARNING,
 			    "%s: Method \"%s\" failed with exit status %d.\n",
 			    inst->ri_i.i_fmri, method, WEXITSTATUS(ret_status));
 		}
 
+		if (type == METHOD_STOP &&
+		    *exit_code == SMF_EXIT_TEMP_TRANSIENT) {
+			log_instance(inst, B_TRUE, "Invalid use of "
+			    "\"$SMF_EXIT_TEMP_TRANSIENT\" in stop method.");
+			result = EINVAL;
+			goto contract_out;
+		}
+
 		log_instance(inst, B_TRUE, "Method \"%s\" exited with status "
 		    "%d.", mname, *exit_code);
 
-		if (*exit_code != 0)
+		if (method_failed(*exit_code) != 0)
 			goto contract_out;
 
 		end_time = time(NULL);
@@ -1169,7 +1192,7 @@
 
 	r = method_run(&inst, info->sf_method_type, &exit_code);
 
-	if (r == 0 && exit_code == 0) {
+	if (r == 0 && method_failed(exit_code) == 0) {
 		/* Success! */
 		assert(inst->ri_i.i_next_state != RESTARTER_STATE_NONE);
 
--- old/usr/src/cmd/vntsd/svc-vntsd	Tue Feb 14 13:25:52 2017
+++ new/usr/src/cmd/vntsd/svc-vntsd	Tue Feb 14 13:25:52 2017
@@ -3,6 +3,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2017 RackTop Systems.
+#
 # CDDL HEADER START
 #
 # The contents of this file are subject to the terms of the
@@ -144,8 +146,7 @@
 	    "because the system has no virtual console concentrator (vcc)" \
 	    "device."
 	/usr/sbin/svcadm disable -t "$SMF_FMRI"
-	sleep 5 &
-	exit $SMF_EXIT_OK
+	exit $SMF_EXIT_TEMP_TRANSIENT
 fi
 
 if [ -x /usr/lib/ldoms/vntsd ]; then
--- old/usr/src/cmd/xvm/ipagent/svc-ipagent	Tue Feb 14 13:25:53 2017
+++ new/usr/src/cmd/xvm/ipagent/svc-ipagent	Tue Feb 14 13:25:53 2017
@@ -21,6 +21,9 @@
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
+#
+# Copyright 2017 RackTop Systems.
+#
 
 interval=$2
 
@@ -31,8 +34,7 @@
 {
 	echo "This service will only run in a PV xVM domU."
 	svcadm disable svc:/system/xvm/ipagent:default
-	sleep 5 &
-	exit $SMF_EXIT_OK
+	exit $SMF_EXIT_TEMP_TRANSIENT
 }
 
 check_is_domu()
--- old/usr/src/lib/libscf/inc/libscf.h	Tue Feb 14 13:25:53 2017
+++ new/usr/src/lib/libscf/inc/libscf.h	Tue Feb 14 13:25:53 2017
@@ -21,7 +21,7 @@
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2016 RackTop Systems.
+ * Copyright 2017 RackTop Systems.
  */
 
 #ifndef	_LIBSCF_H
@@ -870,6 +870,7 @@
 #define	SMF_EXIT_MON_OFFLINE	 98
 #define	SMF_EXIT_ERR_NOSMF	 99
 #define	SMF_EXIT_ERR_PERM	100
+#define	SMF_EXIT_TEMP_TRANSIENT	101
 
 #ifdef	__cplusplus
 }
--- old/usr/src/man/man5/smf_method.5	Tue Feb 14 13:25:53 2017
+++ new/usr/src/man/man5/smf_method.5	Tue Feb 14 13:25:53 2017
@@ -1,9 +1,10 @@
 '\" te
 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2015 RackTop Systems.
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH SMF_METHOD 5 "June 6, 2016"
+.TH SMF_METHOD 5 "March 2, 2017"
 .SH NAME
 smf_method \- service management framework conventions for methods
 .SH DESCRIPTION
@@ -281,6 +282,9 @@
 \fBSMF_EXIT_ERR_PERM\fR	\fB100\fR	T{
 Method requires a form of permission such as file access, privilege, authorization, or other credential that is not available when invoked.
 T}
+\fBSMF_EXIT_TEMP_TRANSIENT\fR	\fB101\fR	T{
+Method that is normally non-transient is temporarily transient.  This is not an error condition and a service returning this value will not be restarted.
+T}
 \fBSMF_EXIT_ERR_OTHER\fR	\fBnon-zero\fR	T{
 Any non-zero exit status from a method is treated as an unknown error. A series of unknown errors can be diagnosed as a fault by the restarter or on behalf of the restarter.
 T}
