[BusyBox] NFS Mounting/Environment variables

Jason A. Pattie pattieja at pcxperience.com
Tue Feb 13 18:04:01 UTC 2001


I have basically two questions about using BB 0.49 (didn't want to 
subscribe to the mailing list, though) concerning mounting NFS 
filesystems and environment variables.

When I first attempted to mount an NFS filesystem inside my rc.setup 
script being called from BB's inittab sysinit entry, it worked OK, 
meaning fast, but spit out a whole bunch of errors like RPC error 101 
not found or something.  The filesystems were successfully mounted and 
could be used.  However, after doing some more work with my initial 
ramdisk filesystem which is running all this, mounting NFS filesystems 
started taking an extremely long time to work, and errors were spit out 
to the effect that portmap could not contact localhost and had timed 
out.  I noticed that there was one posting to the mailing list to this 
effect as if it was a recognized problem, but I could not find a 
discussion on any solution.  Do I need to run a portmap daemon on the 
local host?  Whenever I look at the ouput of the "mount" command, it 
lists the NFS mount options as having the 'lock' option.  I noticed in 
the Config.h file for BB that in order to mount NFS volumes without a 
portmap daemon running, the 'nolock' option needs to be specified to the 
mount command.  I did this, but the output of "mount" was still the 
same.  It still contained the 'lock' option and was still extremely slow 
at connecting and timing out.

The other question I had was basically about environment variables in BB 
init and BB sh (lash).  Does lash have the ability to dereference 
environment variables while running a script?  For example, I know that 
I can 'export' variables into the environment space if I specify the 
export all on one line:
       export LD_LIBRARY_PATH=/lib:/usr/lib
However, I cannot do something like this:
       LD_LIBRARY_PATH=/lib:/usr/lib
       export LD_LIBRARY_PATH
When I want to use that variable in a statement or command, it seems to 
not do any dereferencing of the variable name, but uses the actual text 
as it is typed:
       echo $LD_LIBRARY_PATH
output = (literally)        $LD_LIBRARY_PATH

The other issue related to environment variables is with using BB's 
init.  It does not appear to work like sysvinit does when unrecognized 
options are sent on the kernel command line.  Apparently, sysvinit (or 
the kernel, don't know which) creates environment variables using the 
unrecognized name=value pairs that then become available to scripts run 
by init.

Thank you for your help,

I really like the BusyBox project.  It's allowing me to make my initial 
ramdisk smaller than otherwise possible!

-- 
Jason A. Pattie
pattieja at pcxperience.com






More information about the busybox mailing list