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