1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

. 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>
This commit is contained in:
Greg Lewis 2004-11-12 16:12:48 +00:00
parent 119c49b59d
commit 59fc5151e6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=121460
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@
PORTNAME= javavmwrapper
PORTVERSION= 2.0
PORTREVISION= 1
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none

View File

@ -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