Question about Busbox's MSH (sourcing enviroment files within CASE statement).
Mark Alamo - LHS <MarkAlamo <at> lhsolutions.com>
2004-06-01 15:35:04 GMT
Hi,
I'm trying to use busybox
(1.0.0-pre10) on an embedded platform (ARM-like processor, no
MMU).
I'm have it configured to
use msh as the default sh (using vfork in the code since I don't have an MMU)
and as init.
Everything appears to work OK. I
can boot the unit and login on the console.
The problem: several custom
scripts are attempting to source (Ie. msh's dodot function) subscripts from
within "complex" shell commands (CASE statements, etc).
Although the dodot function is
called at the correct time, the actual sourcing of the subscript and
setting of environment variables is done after the all branches of the CASE are
executed.
This problem also occurs when
multiple commands are listed on the same line (separated by ";").
Example:
Start script:
echo "Start"
; . ./subA ; echo "Mid" ; . ./subB ; echo "End"
subA script:
echo
"subA"
subB script:
echo
"subB"
Output:
> ./start
Start
Mid
End
subB
subA
Thanks,
Mark
_______________________________________________
busybox mailing list
busybox <at> mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox