#
# 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
#
#
m_usage=$(gettext "clone [-c profile.xml | dir] {sourcezone}\n\tThe -c option gives a profile or a directory of profiles to be applied to the system after clone.")
# Clean up on failure
{
fi
case $EXIT_CODE in
# unmount the zoneroot if labeled brand
;;
;;
*)
# Remove datasets that shouldn't exist
;;
esac
exit $EXIT_CODE
}
set -A save_args "$0" "$@"
# Source and destination zones
unset sc_config
# Other brand clone options are invalid for this brand.
while getopts "R:z:c:x:" opt; do
;;
x) ;; # zoneadm only
*) fail_usage "";;
esac
done
if (($# < 1)); then
fail_usage ""
fi
# Configuration profile file must have .xml suffix
fi
shift
# From here on out the global variables referenced are for the destination zone
eval $(bind_legacy_zone_globals dst)
# Make dataset snapshots
# Make dataset clones. This sets EXIT_CODE if datasets created.
#
# Completion of reconfigure_zone will leave the zone root mounted for
# solaris brand zones. The root won't be mounted for labeled brand zones.
#
else
fi
trap - EXIT
exit $ZONE_SUBPROC_OK