#
# CDDL HEADER START
#
# 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
# 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]
#
# CDDL HEADER END
#
#
#
# This postattach hook adds the service tag for the zone.
# We need this in a postattach hook since the zone doesn't have
# a UUID when the attach hook is run.
#
install_media="-"
# If we weren't passed at least two arguments, exit now.
ZONENAME="$1"
ZONEPATH="$2"
shift 2
unset inst_type
unset sc_sysidcfg
#
# This hook will see the same options as the attach hook, so make sure
# we accept all of these.
#
while getopts "a:c:d:nr:x:" opt; do
a)
inst_type="archive"
;;
c) sc_sysidcfg="$OPTARG" ;;
d)
inst_type="directory"
;;
n) noexecute=1 ;;
r)
inst_type="stdin"
;;
x) ;; # zoneadm only
?) error "$f_noscprofile"
exit $ZONE_SUBPROC_OK ;;
*) error "$f_noscprofile"
exit $ZONE_SUBPROC_OK ;;
esac
done
# Copy in sysidcfg file, boot zone, run sysunconfig and halt
if [[ -n $sc_sysidcfg ]]; then
if (( $? != 0 )); then
fi
if (( $? != 0 )); then
fi
fi
# Add a service tag for this zone.
exit $ZONE_SUBPROC_OK