variable assignment / command substitution

Martinb_ARM_NOMMU_KISSDVD martinb at zeelandnet.nl
Wed Jan 16 20:07:24 UTC 2008


I do compile with uclibc and i have the same problem (but i do static
compiling)

-----Oorspronkelijk bericht-----
Van: busybox-bounces at busybox.net [mailto:busybox-bounces at busybox.net]Namens
Ryan Raasch
Verzonden: woensdag 16 januari 2008 9:23
Aan: busybox at busybox.net
Onderwerp: Re: variable assignment / command substitution


Ok.

I have figured out that when statically compiling busybox ( to glibc ) the
command substitution DOES NOT work.

With dynamic linking, the command substitution works ( i am using busybox in
an initramfs for a bootsplash ).

When doing strace (dynamic linking), it seems libcrypt is used, which I did
not use in my static compile link switches. So maybe that is the problem.

Any ideas?


On 15/01/2008, Ryan Raasch <ryan.raasch at gmail.com> wrote:
Hello,

I am using busybox v1.9.0, and I am trying to parse the /proc/cmdline, but
the command substitutions/variable assignments do not seem to work

     cat /proc/cmdline | grep nfsroot

within a shell script (using ash), the above works, but when i do the
following


     NFSROOT=`cat /proc/cmdline | grep nfsroot`
     echo $NFSROOT

it does NOT work, i.e. nothing is assigned to NFSROOT.

Everything works on the host machine (bash). Thanks.




More information about the busybox mailing list