engine-wrapper revision ada1678a4262b208a7b87391f520a7767d25287c
207N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 207N/A# Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved. 207N/A# The contents of this file are subject to the terms of either the GNU 207N/A# General Public License Version 2 only ("GPL") or the Common Development 207N/A# and Distribution License("CDDL") (collectively, the "License"). You 207N/A# may not use this file except in compliance with the License. You can 207N/A# obtain a copy of the License at 207N/A# language governing permissions and limitations under the License. 207N/A# When distributing the software, include this License Header Notice in each 207N/A# GPL Classpath Exception: 207N/A# Oracle designates this particular file as subject to the "Classpath" 207N/A# exception as provided by Oracle in the GPL Version 2 section of the License 207N/A# file that accompanied this code. 207N/A# If applicable, add the following below the License Header, with the fields 207N/A# enclosed by brackets [] replaced by your own identifying information: 207N/A# "Portions Copyright [year] [name of copyright owner]" 207N/A# If you wish your version of this file to be governed by only the CDDL or 207N/A# only the GPL Version 2, indicate your decision by adding "[Contributor] 207N/A# elects to include this software in this distribution under the [CDDL or GPL 207N/A# Version 2] license." If you don't indicate a single choice of license, a 282N/A# recipient has the option to distribute your version of this file under 207N/A# either the CDDL, the GPL Version 2 or to extend the choice of license to 261N/A# its licensees as provided above. However, if you add GPL Version 2 code 320N/A# and therefore, elected the GPL Version 2 license, then the option applies 312N/A# only if the new code is made subject to such option by the copyright 207N/A# Sun Install engine wrapper script 207N/A# binaries needed on both Solaris, Linux, etc. 207N/A#------------------------------------------------------------------------------- 207N/A# usage only: define what parameters are available here 207N/A#------------------------------------------------------------------------------- 261N/A -a <path>, --answerfile=<path> 207N/A Supply a file containing install configuration. Can be used multiple times 207N/A for multiple answer files. 207N/A -n <file>, --dry-run=<file>: 207N/A Dry run mode. Do not install anything. Configuration answers written to <file> 261N/A -R <path>, --altroot=<path> 207N/A Operation with respect to an alternate root 207N/A display version of install engine. 564N/A -l <level>, --level=<level> 564N/A Debug level. One of FATAL, WARNING, INFO, CONFIG, FINE, FINER, FINEST 207N/A -m <url>, --media-location=<url> 207N/A Specify location of metadata used to drive install. If blank, 207N/A -s <dir>, --configstate=<dir> 207N/A Directory where the config data is persisted as xcu files. 564N/A -i <path>, --installables=<path> 564N/A Root directory containing installable units for support of install and repair. 207N/A -j <javahome>, --javahome=<javahome> : 207N/A use this java vm instead of searching for suitable one 207N/A -J <joptions>, --jvmoptions=<joptions> : 261N/A specify java vm options. For example -J "-verbose -Dhttp.proxy=foo.com:3434" 261N/A -C <classpaths>, --classpaths=<classpaths> : 261N/A specify a colon-separated list of additional classpaths 261N/A -c <file>, --config-file=<file> : 261N/A Specify extra properties in a file 261N/A -p <props>, --properties=<props> : 261N/A specify 1 or more config properties options, separated by comma, 320N/A to the install engine. For example: 261N/A --properties=Logs-Location=/tmp,Platform-Plugin-Path=c:\\Sun\\ppp 668N/A#------------------------------------------------------------------------------- 668N/A#------------------------------------------------------------------------------- 668N/A if [ -n "${ADDITIONALCLASSPATHS}" ]; then 668N/A if [ -n "${CLASSPATH}" ]; then 668N/A if [ -n "${DRYRUN}" ]; then 668N/A if [ -n "${CONFIGSTATE}" ]; then 668N/A if [ -n "${ANSWERFILE}" ]; then 668N/A if [ -n "${ALTROOT}" ]; then 668N/A if [ -n "${DEBUGLEVEL}" ]; then 580N/A if [ -n "${MEDIALOC}" ]; then 580N/A if [ -n "${INSTALLABLES}" ]; then 580N/A # Uninstalls typically remove the files that make up the installer, 580N/A # which can cause problems on unix, so as a precautionary measure, 580N/A#------------------------------------------------------------------------------- 580N/A# ****************************** MAIN THREAD *********************************** 580N/A#------------------------------------------------------------------------------- 359N/ALONGOPT=
"h(help)V(version)n:(dry-run)s:(configstate)a:(answerfile)R:(altroot)l:(level)m:(media-location)i:(installables)j:(javahome)J:(jvmoptions)C:(classpaths)c:(config-file)p:(properties)" 297N/A echo `${GETTEXT} "openInstaller is only supported on Solaris 9 or later"` 460N/A # Linux has no built-in support for long-style getopts so we use the short style only 274N/A # The engine knows how to deal with a leading "," so we can use this with no problems: 678N/A # Answer file is a URL or contains substitutions, so don't try and parse it 359N/A # Answer file is not a URL, so resolve relative paths 359N/A if [ ! -d
"${ANSDIR}" -o ! -w
"${ANSDIR}" ];
then 460N/A # Dry-Run file is a URL or contains substitutions, so don't try and parse it 207N/A # Dry-Run file is not a URL, so resolve relative paths 274N/A if [ ! -d
"${DRYDIR}" -o ! -w
"${DRYDIR}" ];
then 274N/A ${
PRINTF}
"`${GETTEXT} '%s must be the root directory of a valid JVM installation'`\n" "${JAVAHOME}" 656N/Aif [ -n
"${VERSIONFLAG}" ] ;
then 656N/A ${
ECHO}
"openInstaller Install Framework 0.9.5" 359N/A echo `${GETTEXT} "Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved."` 667N/A# If its a dry-run and answer file is specified 667N/A# Verify if it already exists. if so, inform the user to choose a different 672N/Aif [ -n
"${DRYRUN}" -a -f
"${DRYRUN}" ] ;
then 672N/A ${
PRINTF}
"`${GETTEXT} 'Dry Run File %s already exists. Please choose a non-existing file path'`\n" "${DRYRUN}" 672N/Aif [ -z
"${JAVAHOME}" ] ;
then