From owner-freebsd-java@FreeBSD.ORG Fri Nov 12 04:02:35 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E995716A4CE for ; Fri, 12 Nov 2004 04:02:35 +0000 (GMT) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 440F443D1D for ; Fri, 12 Nov 2004 04:02:35 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) iAC42OgI076231; Thu, 11 Nov 2004 21:02:26 -0700 (MST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.11/8.12.11/Submit) id iAC42Lre076230; Thu, 11 Nov 2004 21:02:21 -0700 (MST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Thu, 11 Nov 2004 21:02:20 -0700 From: Greg Lewis To: Christian Laursen Message-ID: <20041112040220.GA76106@misty.eyesbeyond.com> References: <86ekj0c79e.fsf@borg.borderworlds.dk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <86ekj0c79e.fsf@borg.borderworlds.dk> User-Agent: Mutt/1.4.2.1i cc: freebsd-java@freebsd.org Subject: Re: The new javavmwrapper and PATH X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 04:02:36 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 12, 2004 at 12:09:49AM +0100, Christian Laursen wrote: > I just upgraded to the new javavmwrapper and noticed that one of my java > programs stopped working. > > It runs binaries usually in the path but javavmwrapper sets the path to > "/bin:/sbin:/usr/bin:/usr/sbin". > > Shouldn't $LOCALBASE/bin and $LOCALBASE/sbin be part of the path as well? > > Or would it perhaps be better to set the original path back before starting > the chosen java binary? Does the attached diff fix this for you? -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="path.diff" Index: src/javavmwrapper.sh =================================================================== RCS file: /home/pcvs/ports/java/javavmwrapper/src/javavmwrapper.sh,v retrieving revision 1.8 diff -u -r1.8 javavmwrapper.sh --- src/javavmwrapper.sh 11 Nov 2004 19:17:37 -0000 1.8 +++ src/javavmwrapper.sh 12 Nov 2004 04:01:31 -0000 @@ -29,6 +29,7 @@ # # MAINTAINER=java@FreeBSD.org +OLD_PATH=${PATH} export PATH=/bin:/sbin:/usr/bin:/usr/sbin PREFIX="%%PREFIX%%" @@ -42,6 +43,9 @@ tryJavaCommand () { # Check for the command being executable and exec it if so. if [ -x "${1}" ]; then + if [ ! -z "${OLD_PATH}" ]; then + export PATH=${OLD_PATH} + fi exec "${@}" fi --fUYQa+Pmc3FrFX/N--