Subject: Don't let your sons grow up to be cowboys ... and $PATH contain files
To: None <netbsd-users@NetBSD.ORG>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 01/25/1995 19:41:44
Boy, this was a strange one.  Dunno if this still happens under -current tho'.

All of a sudden, my XMH started acting weird.  Complained it couldn't execvp()
"msgchk" or "inc".  I looked at my $PATH:

netbsd4me:1:136 % head -5 ~/.xsession

HOME=/home/earle; export HOME
PATH=/usr/bin/X11:/usr/ucb:/bin:/usr/bin:/etc:/sbin:/usr/sbin:${HOME}/bin:/usr/local/bin:/usr/local/etc:/usr/local/lib:/usr/local/mh/bin:/usr/hosts:/usr/old:/usr/gnu/bin:.:; export PATH

Hmmn, "/usr/local/mh/bin" is there all right, what's wrong then?

Turned out that I didn't have a "/usr/local/etc" on my NetBSD system.  When
I went to install the "metamail" MIME software, at some point it does a

	install -c mailcap /usr/local/etc

without checking to see if /usr/local/etc exists and is a directory.  So all
of a sudden now "/usr/local/etc" exists, but it's a plain file!  From then on,
anything in a directory PAST that one in $PATH couldn't be execvp()'d anymore.
(But I could still run things from the tcsh command line, which uses execv().)

Fun, fun fun  (-:

	- Greg