diff options
Diffstat (limited to 'setup_native/scripts/javaloader.sh')
-rw-r--r-- | setup_native/scripts/javaloader.sh | 28 |
1 files changed, 28 insertions, 0 deletions
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 |