variable assignment / command substitution

Ryan Raasch ryan.raasch at gmail.com
Wed Jan 16 08:23:20 UTC 2008


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.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080116/fd38a121/attachment-0002.htm 


More information about the busybox mailing list