#! /bin/sh


mypath="/media/sda1/"
myfile="/media/sda1/1330ec_main.tgz"
mypath1="/media/sdb1/"
myfile1="/media/sdb1/1330ec_main.tgz"
gradefile="/var/ftp/pub/1330ec_main.tgz"
if [ -d "$mypath" ];then
	if [ -f "$myfile" ];then
		cp "$myfile" /var/ftp/pub/

		/home/root/upgrade > /dev/ttyS0
	fi
elif [ -d "$mypath1" ];then
	if [ -f "$myfile1" ];then
		cp "myfile1" /var/ftp/pub/
		/home/root/upgrade > /dev/ttyS0
	fi
else
	if [ -f "$gradefile" ];then
		/home/root/upgrade
	fi
fi
