oiuninstaller revision ada1678a4262b208a7b87391f520a7767d25287c
1a5f954324f2584984fc9cee7a7a8ebe8ef39aeajim# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
91ef999a69527d2a64983681c92aaef9270697b4rpluem# Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved.
91ef999a69527d2a64983681c92aaef9270697b4rpluem# The contents of this file are subject to the terms of either the GNU
cf95511601acd18c75339ef5d90a298e070617ccminfrin# General Public License Version 2 only ("GPL") or the Common Development
cf95511601acd18c75339ef5d90a298e070617ccminfrin# and Distribution License("CDDL") (collectively, the "License"). You
cf95511601acd18c75339ef5d90a298e070617ccminfrin# may not use this file except in compliance with the License. You can
cf95511601acd18c75339ef5d90a298e070617ccminfrin# obtain a copy of the License at
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan# or packager/legal/LICENSE.txt. See the License for the specific
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan# language governing permissions and limitations under the License.
b44a707ac289d826620a65769db8074c96cb6a7erpluem# When distributing the software, include this License Header Notice in each
b44a707ac289d826620a65769db8074c96cb6a7erpluem# file and include the License file at packager/legal/LICENSE.txt.
b44a707ac289d826620a65769db8074c96cb6a7erpluem# GPL Classpath Exception:
bffa28e219ea053efd779f9b25259e4936110cddmturk# Oracle designates this particular file as subject to the "Classpath"
bffa28e219ea053efd779f9b25259e4936110cddmturk# exception as provided by Oracle in the GPL Version 2 section of the License
bffa28e219ea053efd779f9b25259e4936110cddmturk# file that accompanied this code.
bffa28e219ea053efd779f9b25259e4936110cddmturk# Modifications:
bffa28e219ea053efd779f9b25259e4936110cddmturk# If applicable, add the following below the License Header, with the fields
bffa28e219ea053efd779f9b25259e4936110cddmturk# enclosed by brackets [] replaced by your own identifying information:
bffa28e219ea053efd779f9b25259e4936110cddmturk# "Portions Copyright [year] [name of copyright owner]"
e82c197ca8872669af89367746826fe6b9955bb3niq# Contributor(s):
e82c197ca8872669af89367746826fe6b9955bb3niq# If you wish your version of this file to be governed by only the CDDL or
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq# only the GPL Version 2, indicate your decision by adding "[Contributor]
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq# elects to include this software in this distribution under the [CDDL or GPL
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq# Version 2] license." If you don't indicate a single choice of license, a
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq# recipient has the option to distribute your version of this file under
5c05c1f29be5bc37b22794737ee63a5f567053b5jim# either the CDDL, the GPL Version 2 or to extend the choice of license to
5c05c1f29be5bc37b22794737ee63a5f567053b5jim# its licensees as provided above. However, if you add GPL Version 2 code
5c05c1f29be5bc37b22794737ee63a5f567053b5jim# and therefore, elected the GPL Version 2 license, then the option applies
5c05c1f29be5bc37b22794737ee63a5f567053b5jim# only if the new code is made subject to such option by the copyright
f82568a780e35e8786958c49a1259434e2088b9cniq# binaries needed on both Solaris, Linux, etc.
d05e6175473332a8433e4ac85edda0d5a33c94b5minfrin# PWD is a reserved variable name in many unix shells, so use _PWD
db455cbc662c98dbbf53175393c50086ff63370cchrisd # Mac OS is.. different. Contains no gettext, and utils are in other places
2e242dca7111f99d54dd144b7b8418d88d560032chrisd# global settings
b5d91f803b61ef5b13666e423173eb72d96f8938niq# user options
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin#-------------------------------------------------------------------------------
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin# usage only: define what parameters are available here
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin# input(s): exitCode
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin#-------------------------------------------------------------------------------
caaa32f2d2e3b28063c745c2632d3979da7f8326minfrinUsage: <GlassFish uninstallation program.> [-options]
caaa32f2d2e3b28063c745c2632d3979da7f8326minfrinwhere options include:
66a8e1cc29cc4612cd938bc8fcabc0ef569e5769rpluem -l <Log Directory>
caaa32f2d2e3b28063c745c2632d3979da7f8326minfrin log information goes to this directory
e02cb8f5090d904c054633ff33dfd1111e16e404minfrin -q Logging level set to WARNING
e02cb8f5090d904c054633ff33dfd1111e16e404minfrin -v Logging level set to FINEST
e02cb8f5090d904c054633ff33dfd1111e16e404minfrin -s run this application in silent mode
66a8e1cc29cc4612cd938bc8fcabc0ef569e5769rpluem -j <javahome>
e02cb8f5090d904c054633ff33dfd1111e16e404minfrin JRE installation directory to be used by this program.
8a3e2ef19ddfb8addcccdc61da0d1442695a8280rpluem print this help message
213e520edc00641400771fc8f90b37a967a2d9ebdirkx#-------------------------------------------------------------------------------
a449830d5caa5b9900fe64cc383658b3641f9810dirkx# perform actual operation for the script: install/uninstall
a449830d5caa5b9900fe64cc383658b3641f9810dirkx# input(s): none
a449830d5caa5b9900fe64cc383658b3641f9810dirkx# output(s): instCode
a449830d5caa5b9900fe64cc383658b3641f9810dirkx#-------------------------------------------------------------------------------
c2213b3a46a2666e2e7606ceec509cc4978f187fminfrin ENGINE_OPS="${ENGINE_OPS} -p Logs-Location=${LOGDIR}"
fd279fe992f7171dc3f6d4d40d6db5bb74f2d96eminfrin ENGINE_OPS="${ENGINE_OPS} -C ${ADDITIONALCLASSPATHS}"
abe0d0e38b9705f21a13ac8748bce1e3ed35e488minfrin${ENGINE_DIR}/bin/engine-wrapper -J "${JAVA_OPTIONS}" ${ENGINE_OPS}
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin#-------------------------------------------------------------------------------
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin# ****************************** MAIN THREAD ***********************************
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin#-------------------------------------------------------------------------------
a72211e92bab814bfa28ee086ca9b2a1a6095c92chrisd# Linux has no built-in support for long-style getopts so we use the short style only
a72211e92bab814bfa28ee086ca9b2a1a6095c92chrisdLONGOPT="h(help)l:(logdir)q(quiet)v(verbose)t(text)m:(media-location)n:(dry-run)s:(configstate)a:(answerfile)j:(javahome)J:(jvmoptions)C:(classpaths)p:(properties)"
9582ad6e149d28b118d4e8571101ecb6f85e0191niq echo `${GETTEXT} "openInstaller is only supported on Solaris 9 or later"`
ed0d39878e79220baaa50c15b79b1fdf877cb919niq # Linux has no built-in support for long-style getopts so we use the short style only
1e911973bcb9df6701a4c16c037771ecf25ade13niq# check arguments
33aad3911b15cb5d523075f7df829274fe298a13dirkx ${PRINTF} "`${GETTEXT} '%s is not a directory or is not writable'`\n" "${LOGDIR}"
65cb7f00eca6689c8a89dc809359991ade1285bcwrowe ${PRINTF} "`${GETTEXT} '%s must be the root directory of a valid JVM installation'`\n" "${JAVA_HOME}"