Subject: Re: /etc/rc.d scripts and $PATH
To: Peter Seebach <seebs@plethora.net>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 09/15/2003 17:01:11
[ On Monday, September 15, 2003 at 14:23:30 (-0500), Peter Seebach wrote: ]
> Subject: Re: /etc/rc.d scripts and $PATH 
>
> In message <m19yyve-000B3IC@proven.weird.com>, "Greg A. Woods" writes:
> >[ On Monday, September 15, 2003 at 04:02:24 (-0500), Peter Seebach wrote: ]
> >> Subject: /etc/rc.d scripts and $PATH
> >>
> >> In days of yore, there was no convenient way to access stat(2) from a command
> >> line, so I wrote a utility named, inventively, 'stat'.
> >> 
> >> So now, if I try to run some rc.d scripts from a prompt, they fail because
> >> my $PATH is wrong.  Shouldn't rc.d scripts set their paths to /usr/bin and
> >> /usr/sbin (or whatever) preemptively?
> >
> >I think the right question would be:  why isn't your "stat" utility
> >sitting in /bin where: (a) it will be around at the time _any_ rc.d
> >script might need it; and (b) all good, small, low-level, user-land,
> >system tools reside?  :-)
> 
> Because my 'stat' utility isn't the one that /etc/rc.d/smmsp wants - smmsp
> wants the new 'stat' utility that got added to NetBSD sometime within the
> last few years.

Ah, OK, that sheds more light!  ;-)

The point I was trying hard _not_ to make explicilty was that /usr might
not be mounted when any given rc.d script ran.

In this case I'd say your root environment shouldn't include private
paths to bin directories containing non-standard commands.  ;-)

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>