[BusyBox] export problem in rcS

Rob Landley rob at landley.net
Wed Feb 18 10:49:21 UTC 2004


On Wednesday 18 February 2004 04:31, jerome wrote:
> Hello all,
>
> using bb 1.0.0 pre7 with kernel 2.4.20
>
> I've tried to set and export a PATH from rcS after boot but env is not
> updated.
> export works fine from the command line after boot, but not when it's
> included in any startup script.
> it's the same with alias.
>
> rcS:
> #!/bin/sh
>
> alias ll='ls -l'
>
> LD_LIBRARY_PATH = "/tmp/usr/lib"
> export LD_LIBRARY_PATH
>
> any ideas ?

init forks a shell to interpret shell scripts.  That environment terminates 
with the child process, and the parent process's environment is unmodified.
Are you implying this worked with a normal non-busybox init?  (This is what 
.profile is for, isn't it?)

On a related note, it used to be possible to have init's environment 
intermingled with that of various system daemons, in terms of open 
filehandles and stuff, but I vaguely recall 2.6 cleaned that up...

Rob




More information about the busybox mailing list