Subject: Re: pkgsrc question
To: None <netbsd-users@netbsd.org>
From: Mike Parson <mparson@bl.org>
List: netbsd-users
Date: 10/22/2001 14:53:15
Bad move to reply to one's own posting, but I figured it out..

On Mon, Oct 22, 2001 at 01:52:33PM -0500, Mike Parson wrote:
> On Mon, Oct 22, 2001 at 07:57:55PM +0200, Alistair Crooks wrote:

<snip>

> > You should also check for any definitions of AWK or SH in /etc/mk.conf
> > or your environment.
> 
> <homer>
> Doh.
> </homer>
> 
> I'd mved sh out of the way and linked ksh to sh to solve another problem,
> some time ago.  This only recently impacted pkgsrc though.   Putting 'real'
> sh back as /bin/sh seems to have solved the pkgsrc problem.
> 
> The problem I 'fixed' was that some programs that called /bin/sh were
> calling 'env' just after executing.  This would happen with man, perldoc, and
> a few others:
> 
> -- start --
> [~] $ man bash
> man: Formatting manual page...
> _=/usr/bin/env
> PAGER=less
> PS1=\[\033[1m\][\t]\[\033[m\] [\w] \h \n\$
> PATH=/home/mparson/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/X11R6/bin:/usr/local/java/bin:/usr/local/bin:/usr/local/sbin

<snip>

> BASH(1)                                                   BASH(1)
> 
> <rest of manpage begins here>
> 
> -- end -- 

> 
> Any ideas on this one? :-)

$ cat /home/mparson/bin/test

#!/bin/sh

env


I kinda remember doing this.
I don't recall *why* I did this.
I feel like a doofus for doing this.
Not sure why making /bin/ksh be /bin/sh seemingly fixed things, but I've
put everything back how it should be.

And I've put ~/bin at the *end* of my path, after nuking the bogus test program.

*sigh*

Today's lesson, don't call test programs 'test' and leave them
first in your $PATH.

-- 
Michael Parson
mparson@bl.org