#!/bin/sh mount -o remount rw / echo "==================== Start App ====================" /usr/sbin/telnetd eval $( /usr/bin/awk '/\/dev\/root/ {printf("flashfs=%s", $3)}' /proc/mounts) eval $( /usr/bin/awk '/nfs/ {printf("fstype=%s", $3)}' /proc/mounts) eval $( /usr/bin/awk '/system/{$a=substr($0,4,1);printf("system_name=/dev/mtdblock%d",$a)}' /proc/mtd) eval $( /usr/bin/awk '/dav1/{$a=substr($0,4,1);printf("para1_name=/dev/mtdblock%d", $a)}' /proc/mtd) eval $( /usr/bin/awk '/dav2/{$a=substr($0,4,1);printf("para2_name=/dev/mtdblock%d",$a)}' /proc/mtd) echo "partition information:" echo "current filesystem on:$flashfs$fstype" echo system_name=$system_name echo para1_name=$para1_name echo para2_name=$para2_name if [ "$flashfs" == "ext2" ] ; then echo "==================== flash filesystem ====================" if [ "$system_name" != "" ] ; then /bin/mount -t yaffs2 "$system_name" /boot/ if [ -e /boot/app.tar.gz ] ; then /bin/tar -zxf /boot/app.tar.gz -C / echo "mount yaffs2 filesystem done." else echo "no application package!!!." fi fi if [ "$para1_name" != "" ] ; then /bin/mount -t yaffs2 "$para1_name" /dav1/ fi if [ "$para2_name" != "" ] ; then /bin/mount -t yaffs2 "$para2_name" /dav2/ fi elif [ "$fstype" == "nfs" ] ; then echo "==================== network filesystem ====================" else echo "==================== unknown filesystem ====================" fi sh /home/startapp.sh