changeset 13657:5f6ef8da78ee

2576 net-nwam should check if ibd_upgrade is installed Reviewed by: Gary Mills <gary_mills@fastmail.fm> Reviewed by: Andrew Stormont <Andrew.Stormont@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Milan Jurik <milan.jurik@xylab.cz>
date Sun, 01 Apr 2012 04:26:40 -0500
parents 57f5c4bc231c
children 1e6115622470
files usr/src/cmd/svc/milestone/net-nwam usr/src/cmd/svc/milestone/net-physical
diffstat 2 files changed, 18 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/svc/milestone/net-nwam	Sat Mar 31 22:09:43 2012 -0400
+++ b/usr/src/cmd/svc/milestone/net-nwam	Sun Apr 01 04:26:40 2012 -0500
@@ -21,6 +21,7 @@
 #
 #
 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012 Milan Jurik. All rights reserved.
 #
 
 . /lib/svc/share/smf_include.sh
@@ -537,15 +538,17 @@
 
 		#
 		# Upgrade handling for ibd:
-		# After we are done with the upgrade handling, we can not set the
-		# ibd/ibd_upgraded property to "true" as the file system is
-		# read-only at this point. It will be done later by ibd-post-upgrade
-		# service.
+		# After we are done with the upgrade handling, we can not set
+		# the ibd/ibd_upgraded property to "true" as the file system is
+		# read-only at this point. It will be done later by
+		# ibd-post-upgrade service.
 		#
-		ibd_upgraded=`/bin/svcprop -c -p ibd/ibd_upgraded \
-		    svc:/network/physical:default 2> /dev/null`
-		if [ "$ibd_upgraded" != "true" ]; then
-			/sbin/ibd_upgrade -v
+		if [ -x /sbin/ibd_upgrade ]; then
+			ibd_upgraded=`/bin/svcprop -c -p ibd/ibd_upgraded \
+			    svc:/network/physical:default 2> /dev/null`
+			if [ "$ibd_upgraded" != "true" ]; then
+				/sbin/ibd_upgrade -v
+			fi
 		fi
 
 		# Bring up simnet instances
--- a/usr/src/cmd/svc/milestone/net-physical	Sat Mar 31 22:09:43 2012 -0400
+++ b/usr/src/cmd/svc/milestone/net-physical	Sun Apr 01 04:26:40 2012 -0500
@@ -21,6 +21,7 @@
 #
 #
 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012 Milan Jurik. All rights reserved.
 #
 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
 # All rights reserved.
@@ -67,10 +68,12 @@
 	# read-only at this point. It will be done later by ibd-post-upgrade
 	# service.
 	#
-	ibd_upgraded=`/bin/svcprop -c -p ibd/ibd_upgraded \
-	    $SMF_FMRI 2> /dev/null`
-	if [ "$ibd_upgraded" != "true" ]; then
-		/sbin/ibd_upgrade -v
+	if [ -x /sbin/ibd_upgrade ]; then
+		ibd_upgraded=`/bin/svcprop -c -p ibd/ibd_upgraded \
+		    $SMF_FMRI 2> /dev/null`
+		if [ "$ibd_upgraded" != "true" ]; then
+			/sbin/ibd_upgrade -v
+		fi
 	fi
 
 	#