xref: /titanic_41/usr/src/cmd/ibd_upgrade/ibd-post-upgrade (revision 1cfa752f4e24c34133009b0f6c139127a5c461de)
1*1cfa752fSRamaswamy Tummala#!/sbin/sh
2*1cfa752fSRamaswamy Tummala#
3*1cfa752fSRamaswamy Tummala# CDDL HEADER START
4*1cfa752fSRamaswamy Tummala#
5*1cfa752fSRamaswamy Tummala# The contents of this file are subject to the terms of the
6*1cfa752fSRamaswamy Tummala# Common Development and Distribution License (the "License").
7*1cfa752fSRamaswamy Tummala# You may not use this file except in compliance with the License.
8*1cfa752fSRamaswamy Tummala#
9*1cfa752fSRamaswamy Tummala# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*1cfa752fSRamaswamy Tummala# or http://www.opensolaris.org/os/licensing.
11*1cfa752fSRamaswamy Tummala# See the License for the specific language governing permissions
12*1cfa752fSRamaswamy Tummala# and limitations under the License.
13*1cfa752fSRamaswamy Tummala#
14*1cfa752fSRamaswamy Tummala# When distributing Covered Code, include this CDDL HEADER in each
15*1cfa752fSRamaswamy Tummala# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*1cfa752fSRamaswamy Tummala# If applicable, add the following below this CDDL HEADER, with the
17*1cfa752fSRamaswamy Tummala# fields enclosed by brackets "[]" replaced with your own identifying
18*1cfa752fSRamaswamy Tummala# information: Portions Copyright [yyyy] [name of copyright owner]
19*1cfa752fSRamaswamy Tummala#
20*1cfa752fSRamaswamy Tummala# CDDL HEADER END
21*1cfa752fSRamaswamy Tummala#
22*1cfa752fSRamaswamy Tummala#
23*1cfa752fSRamaswamy Tummala# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*1cfa752fSRamaswamy Tummala#
25*1cfa752fSRamaswamy Tummala
26*1cfa752fSRamaswamy Tummala. /lib/svc/share/smf_include.sh
27*1cfa752fSRamaswamy Tummala
28*1cfa752fSRamaswamy Tummala#
29*1cfa752fSRamaswamy Tummala# Actual work of ibd upgrade is done in network/physical service.
30*1cfa752fSRamaswamy Tummala# Here we mearly set the property to indicate that the ibd upgrade has been
31*1cfa752fSRamaswamy Tummala# done. Setting of the property can not be done in network/physical service
32*1cfa752fSRamaswamy Tummala# because the file system is read-only at that point.
33*1cfa752fSRamaswamy Tummala#
34*1cfa752fSRamaswamy Tummalaif smf_is_globalzone; then
35*1cfa752fSRamaswamy Tummala	NETPHYS=svc:/network/physical:default
36*1cfa752fSRamaswamy Tummala	PROP=ibd/ibd_upgraded
37*1cfa752fSRamaswamy Tummala
38*1cfa752fSRamaswamy Tummala	upgrade_done=`/bin/svcprop -c -p $PROP $NETPHYS 2> /dev/null`
39*1cfa752fSRamaswamy Tummala
40*1cfa752fSRamaswamy Tummala	if [ "$upgrade_done" != "true" ]; then
41*1cfa752fSRamaswamy Tummala		/usr/sbin/svccfg -s $NETPHYS addpg ibd system 2> /dev/null
42*1cfa752fSRamaswamy Tummala		/usr/sbin/svccfg -s $NETPHYS setprop $PROP = boolean: true
43*1cfa752fSRamaswamy Tummala	fi
44*1cfa752fSRamaswamy Tummalafi
45*1cfa752fSRamaswamy Tummala
46*1cfa752fSRamaswamy Tummala/usr/sbin/svcadm disable $SMF_FMRI
47*1cfa752fSRamaswamy Tummalaexit $SMF_EXIT_OK
48