From 8b150744c838f402331c47e7cd1ccea0d2fa1b98 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 23 Mar 2012 16:59:00 -0500 Subject: [PATCH] server: more problems, switch to attempting to download file then just pings Signed-off-by: Robert Nelson --- mk_mmc.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index d845f90..b9532f9 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -176,7 +176,6 @@ function detect_software { } function rcn-ee_down_use_mirror { - echo "" echo "rcn-ee.net down, switching to slower backup mirror" echo "-----------------------------" MIRROR=${BACKUP_MIRROR} @@ -191,10 +190,13 @@ function dl_bootloader { mkdir -p ${TEMPDIR}/dl/${DISTARCH} mkdir -p "${DIR}/dl/${DISTARCH}" - echo "Checking rcn-ee.net to see if server is up and responding to pings..." - ping -c 3 -w 10 www.rcn-ee.net | grep "ttl=" &> /dev/null || rcn-ee_down_use_mirror + echo "attempting to use rcn-ee.net for dl files [10 second time out]..." + wget -T 10 -t 1 --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader - wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader + if [ ! -f ${TEMPDIR}/dl/bootloader ] ; then + rcn-ee_down_use_mirror + wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/tools/latest/bootloader + fi if [ "$RCNEEDOWN" ];then sed -i -e "s/rcn-ee.net/rcn-ee.homeip.net:81/g" ${TEMPDIR}/dl/bootloader