summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2004-11-12 16:12:48 +0000
committerGreg Lewis <glewis@FreeBSD.org>2004-11-12 16:12:48 +0000
commit59fc5151e6d2065c7ccf39cf2f654da365bf2738 (patch)
tree720c10464be77228206e1f403328a94265055326
parentUpdate to 2.7. (diff)
. javavmwrapper uses PATH to make sure it gets the system version of
utilities. Unfortunately this overrides any PATH that may have been set by the user and hence affects the ability of java to execute external programmes. So, save the PATH before setting it and then restore it immediately before executing java. . Bump PORTREVISION for this fix. Reported by: Christian Laursen <xi@borderworlds.dk>
Notes
Notes: svn path=/head/; revision=121460
-rw-r--r--java/javavmwrapper/Makefile1
-rw-r--r--java/javavmwrapper/src/javavmwrapper.sh4
2 files changed, 5 insertions, 0 deletions
diff --git a/java/javavmwrapper/Makefile b/java/javavmwrapper/Makefile
index 6f69805e8ca5..64a455aacf9e 100644
--- a/java/javavmwrapper/Makefile
+++ b/java/javavmwrapper/Makefile
@@ -9,6 +9,7 @@
PORTNAME= javavmwrapper
PORTVERSION= 2.0
+PORTREVISION= 1
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none
diff --git a/java/javavmwrapper/src/javavmwrapper.sh b/java/javavmwrapper/src/javavmwrapper.sh
index b6447448911f..b3685bd7e17c 100644
--- a/java/javavmwrapper/src/javavmwrapper.sh
+++ b/java/javavmwrapper/src/javavmwrapper.sh
@@ -29,6 +29,7 @@
#
# MAINTAINER=java@FreeBSD.org
+SAVE_PATH=${PATH}
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
PREFIX="%%PREFIX%%"
@@ -42,6 +43,9 @@ MAKE=/usr/bin/make
tryJavaCommand () {
# Check for the command being executable and exec it if so.
if [ -x "${1}" ]; then
+ if [ ! -z "${SAVE_PATH}" ]; then
+ export PATH=${SAVE_PATH}
+ fi
exec "${@}"
fi