Date: Wed, 03 Jan 2001 15:09:24 -0700 From: Bradford Castalia <Castalia@azstarnet.com> To: FreeBSD Java mailing list <freebsd-java@freebsd.org> Cc: Ernst de Haan <ernst@jollem.com> Subject: Re: Sun JDK-1.3 .java_wrapper patch Message-ID: <3A53A314.D09EAEE6@azstarnet.com> References: <20010102010729.A3400@c187104187.telekabel.chello.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Update: After installing the Forte for Java package from Sun I noticed that the startup wrappers it uses (runide) also resolve symlinks using the expr utility. In this case "expr" is not given an absolute path and the regex portion of the commands (in the single quotes following the colon character) begin with a circumflex character ('^') but are otherwise the same as in the .java_wrapper script. This works correctly as is; a backslash before the forward slash is not required. It's interesting that the man page for expr says, "The regular expression is anchored to the beginning of the string with an implicit ``^''." Hmmmmm. Brad Castalia > Subject: Sun JDK-1.3 .java_wrapper patch > Date: Mon, 01 Jan 2001 15:59:06 -0700 > From: Bradford Castalia <Castalia@azstarnet.com> > > Just F.Y.I.: > > Ernst de Haan submitted (18 July, 2000) a patch to the Sun JDK-1.3 .java_wrapper > script file that changes /usr/bin/expr to /usr/compat/linux/usr/bin/expr. I have > found that /bin/expr will work just fine if the '/' in the regex of the second use > of expr is escaped. Thus > > *** .java_wrapper.orig Mon Sep 18 18:05:19 2000 > --- .java_wrapper Sat Dec 30 18:14:46 2000 > *************** > *** 31,38 **** > # Resolve symlinks. See 4152645. > while [ -L "$PRG" ]; do > ls=`/bin/ls -ld "$PRG"` > ! link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'` > ! if /usr/bin/expr "$link" : '/' > /dev/null; then > PRG="$link" > else > PRG="`/usr/bin/dirname $PRG`/$link" > --- 31,38 ---- > # Resolve symlinks. See 4152645. > while [ -L "$PRG" ]; do > ls=`/bin/ls -ld "$PRG"` > ! link=`/bin/expr "$ls" : '.*-> \(.*\)$'` > ! if /bin/expr "$link" : '\/' > /dev/null; then > PRG="$link" > else > PRG="`/usr/bin/dirname $PRG`/$link" > > -- > > Bradford Castalia Castalia@azstarnet.com > Systems Analyst http://azstarnet.com/~castalia > idaeim 520-624-6629 > > "Build an image in your mind, fit yourself into it." > The Log of Cyradis, Seeress of Kell. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A53A314.D09EAEE6>