find_mtd_part() {
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
local PREFIX=/dev/mtdblock
-
+
PART="${PART##mtd}"
[ -d /dev/mtdblock ] && PREFIX=/dev/mtdblock/
echo "${PART:+$PREFIX$PART}"
cd $1
echo -n "creating directories... "
{
- cd $2
+ cd $2
find . -xdev -type d
echo "./dev ./overlay ./mnt ./proc ./tmp"
# xdev skips mounted directories
- cd $1
+ cd $1
} | xargs mkdir -p
echo "done"
mount -t mini_fo -o base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
else
mount --bind / /mnt
- mount --bind -o union "$1" /mnt && root=/mnt
+ mount --bind -o union "$1" /mnt && root=/mnt
fi
} || {
[ "$3" = "1" ] && {