Peter Wemm <[EMAIL PROTECTED]> writes:
> Indeed it is installed.  Note that you have exposed a fundamental bug
> in the perl wrapper.  It only searches $PATH, and /usr/local/bin is not
> in $PATH for many system tools (eg: pkg_add -r).

How about this:

Index: perl.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/perl/perl.c,v
retrieving revision 1.2
diff -u -u -r1.2 perl.c
--- perl.c      18 May 2002 05:33:28 -0000      1.2
+++ perl.c      25 May 2002 12:52:43 -0000
@@ -59,5 +59,6 @@
                if (errno != ENOENT)
                        err(1, "%s", path);
        }
+       execve("/usr/local/bin/perl", argv, environ);
        errx(1, "Perl is not installed, try 'pkg_add -r perl'");
 }

Of course, it won't work if Perl was installed with a non-standard
PREFIX.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to