variable handling in ash

Richard Offer richard at whitequeen.com
Sun Nov 26 11:13:59 UTC 2006


I have an ash-based /linuxrc, and I can not get it to use the
variables passed on the kernel command line.

If I do an export (or set), I can see all the variables there. If I
try and do an echo of the variable (both the shell built in echo and
busybox's applet) I see nothing.

In fact I can't get it to use any variable - even ones set in the script.

#! /bin/sh
. /config

/busybox mount -n -o remount,rw /

/busybox mount -t proc /proc /proc

export
echo ${ROOTISHD}

/busybox grep ROOTISHD=yes /proc/cmdline
HD=$?

echo ${HD}
export HD=0
echo ${HD}

(all echo statements just echo a newline)

Obviously I'm missing something, but I'm baffled.


richard.

PS This is with 1.1.0



More information about the busybox mailing list