On 3 Nov 2008 at 15:34, Rob Landley wrote:

From:                   Rob Landley <[EMAIL PROTECTED]>
To:                     [email protected]
Subject:                Re: Initial Path - Question...
Date sent:              Mon, 3 Nov 2008 15:34:38 -0500
Copies to:              "Michael D. Setzer II" <[EMAIL PROTECTED]>

> On Monday 03 November 2008 00:26:30 Michael D. Setzer II wrote:
> > I have the g4l project that uses busybox plus a number of other programs.
> > A number of the additional programs I was building and installing manually
> > into directories in the path. As it turns out, some of the programs make
> > install puts the files in the /usr/local/bin or /usr/local/sbin.
> >
> > I then wrote a little script that will compare the files in my build
> > directory, to the systems to see if the files have been updated, and show
> > what is different. I then moved the files from there old locations to the
> > new /usr/local directories. I had found a web page saying the /usr/local
> > directories are part of the standard path. But a test of the new build
> > fail, and checking the path showed the /usr/local were not part of the path
> > with the boot.
> >
> > I added an export to command to the .bash_profile to fix the issue, but was
> > wondering if there is a better way, or if this is how things are suppose to
> > be. Not sure where the PATH value is set.
> 
> We usually inherit one in the environment from whatever program ran us.
> 
> We used to use _PATH_STDPATH out of /usr/include/paths.h but now there's a 
> hand-wired definition of bb_PATH_root_path[] in libbb/messages.h for some 
> reason, and that's what ash sets its varinit_data[] to.  If it's ever 
> checking the environment it inherits to see if PATH is already set, I can't 
> find where...

That appears to be what I was looking for. The busybox does the init for the 
boot up on the 
cd, so it is setting the path that is used by everything.

http://www.faqs.org/docs/Linux-mini/Path.html#s4

Shows
===============
4. Init

Init is a parent process for all the other processes of the system. Other 
processes inherit 
environment of the init process and the path is the init path in the rare case 
that no other path 
is set.

The 'init path' is fixed in the source of the init program and it is:

    /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

Note that init path does not contain /usr/local/bin. 
==================

The message.c shows it as:
"PATH=/sbin:/usr/sbin:/bin:/usr/bin"

The libbb.h has a comment that showed:
util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin

But in either case, I would still need to add /usr/lcoal/bin anyway..
But now I at least know where it is defined??

Thanks


> 
> Rob


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:[EMAIL PROTECTED]                            
  mailto:[EMAIL PROTECTED]
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

[EMAIL PROTECTED] CREDITS
SETI 6,734,950.2088 | EINSTEIN 2,081,957.9009 | ROSETTA 668,226.5637

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to