## ## Init staff for updating ## . /root/initupd.sh ulimit -c unlimited export MALLOC_CHECK_=2 ## ## Start up instrument Application ## cd /root/app ./instApp& ## ## Get InstApp pid ## pid=`ps | grep instApp | awk '{print $1}' | head -1` if [ -z $pid ] ; then echo "cannot get instApp pid, app seems error exit." fi ## ## Configure network and set IPv6 address ## ipv6="" ifconfig usb0 192.168.2.71 ## ## Check ipv6 ## while [ -z $ipv6 ] do ipv6=`ifconfig | grep inet6 | awk '{print $3}'` if [ -z $ipv6 ] ; then echo "IPv6 network not ready." sleep 1 else ip addr del $ipv6 dev usb0 ip -6 addr add fe80::22ff:fe44:6688/64 dev usb0 kill -s 17 $pid sleep 1 kill -s 17 $pid sleep 1 kill -s 17 $pid fi done ## ## Check and copy coredump file to UPan ## sleep 5 if [ -e /root/app/core ] ; then if [ -e /dev/sda1 ] ; then if [ ! -e /mnt/rfs/ ] ; then mkdir /mnt/rfs fi mount /dev/sda1 /mnt/rfs/ cp /root/app/core /root/app/instApp /mnt/rfs/ && sync && rm /root/app/core & fi fi