From f9066e6294489d96efe48b11a1f02b796e02a9ad Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Mon, 15 Oct 2007 12:35:46 +0000 Subject: INTEGRATION: CWS native106 (1.4.14); FILE MERGED 2007/08/13 15:44:32 is 1.4.14.1: #i80641# saving jre for uninstallation --- setup_native/scripts/javaloader.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'setup_native/scripts/javaloader.sh') diff --git a/setup_native/scripts/javaloader.sh b/setup_native/scripts/javaloader.sh index 2488a8999c6d..3775fc1baa5c 100644 --- a/setup_native/scripts/javaloader.sh +++ b/setup_native/scripts/javaloader.sh @@ -108,6 +108,26 @@ EOF exit $errorcode } +set_jre_for_uninstall() +{ + # if "uninstalldata" exists, this is not required + if [ ! -d "uninstalldata" ]; then + packagepath="RPMS" + jrefile=`find $packagepath -type f -name "jre*.rpm" -print` + jrefile=`basename $jrefile` + if [ -z "$jrefile" ]; then + jrefile="notfound" + fi + + # check existence of jre rpm + if [ ! -f $packagepath/$jrefile ]; then + errortext="Error: Java Runtime Environment (JRE) not found in directory: $packagepath" + errorcode="4" + do_exit + fi + fi +} + install_linux_rpm() { # Linux requires usage of rpm2cpio to install JRE with user privileges @@ -434,6 +454,14 @@ if [ "$java_runtime_set" != "yes" ]; then fi fi +# jre for Linux is also required, if java runtime is set (for uninstallation mode) +if [ "$java_runtime_set" = "yes" ]; then + platform=`uname -s` + if [ "`uname -s`" = "Linux" ]; then + set_jre_for_uninstall + fi +fi + start_java cleanup -- cgit v1.2.3