echo "updating $image to $part"

if [ -z "$part" -o -z "$image" ]; then
	echo "define \$part and \$image"
	exit 1
fi

if [ \! -e "$part" ]; then
        echo "Partition $part does not exist"
        exit 1
fi

if [ $# = 1 ]; then
        image=$1
fi

if [ x$ip = xdhcp ]; then
        dhcp
fi

unprotect $part
erase $part
tftp $image $part
