#
# 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
#
#
#
#
# common shell script functions
#
exit $EXIT_CODE
}
#
# options processing
#
# If we weren't passed at least two arguments, exit now.
# used by start_log()
set -A save_args "$0" "$@"
typeset zone
eval $(bind_legacy_zone_globals zone)
shift 2
options="FhHnvx:"
options_seen=""
opt_F=""
opt_n=""
opt_v=""
# check for bad or duplicate options
OPTIND=1
x) ;; # zoneadm only
\? ) uninstall_usage_err ;; # invalid argument
: ) uninstall_usage_err ;; # argument expected
* )
if [ -n "$options_repeat" ]; then
[ $? = 0 ] && break
fi
( echo $options_seen | grep $opt >/dev/null ) &&
options_seen="${options_seen}${opt}"
;;
esac
done
# check for a help request
OPTIND=1
h|H ) uninstall_usage
esac
done
# process options
OPTIND=1
F ) opt_F="-F" ;;
n ) opt_n="-n" ;;
v ) opt_v="-v" ;;
esac
done
#
# main
#
nop=""
if [[ -n "$opt_n" ]]; then
nop="echo"
#
# in '-n' mode we should never return success (since we haven't
# actually done anything). so override ZONE_SUBPROC_OK here.
#
fi
if [[ -n "$ZONEPATH_DS" ]]; then
fi
# Set exit code for trap handler.
exit $ZONE_SUBPROC_OK