#!/bin/sh wait_dev_or_exit() { x=0 timeout=5 while [ "$x" -lt "$timeout" -a ! -e $1 ]; do x=$((x+1)) sleep .1 done if [ "$x" -ge "$timeout" ]; then echo "[appset overlay] $1 not found" exit -1 fi } # if /proc/mtd not exist, exit if [ ! -f /proc/mtd ]; then echo "[appset overlay] /proc/mtd not ready" exit -1 fi # if the partition not found, exit num=`cat /proc/mtd | grep \"appset\" | awk -F' ' '{print $1}' | tr -d 'mtd' | tr -d ':'`; if [ -z "$num" ]; then echo "[appset overlay] no appset partition" exit 0 fi #============mount appset START================== echo "[appset overlay] ramdisk mount appset" ubiattach /dev/ubi_ctrl -m $num wait_dev_or_exit /dev/ubi1_0 # read only mount -t ubifs -r /dev/ubi1_0 /appset #mount /dev/ubi1_0 /appset #mount /appset/ko/$KERVER /lib/modules/$KERVER #============mount appset END================== sh /etc/init.d/mount_bind.sh #read -t 2 -p " Press q -> ENTER to exit boot procedure? " exit_boot #if [ "$exit_boot" != "q" ] ; then # sh /appset/ko/mod_init.sh #fi sh /appset/ko/mod_init.sh mkdir -p /tmp/etc/ppp/ ln -s /etc/resolv.conf /tmp/etc/ppp/resolv.conf