View | Details | Raw Unified | Return to bug 235538
Collapse All | Expand All

(-)freebsd-update.sh_modified (+18 lines)
Lines 969-974 Link Here
969
#
969
#
970
# We ignore the Port field, since we are always going to use port 80.
970
# We ignore the Port field, since we are always going to use port 80.
971
971
972
# Check connectivity to the server and loop until it works. On
973
# non-interactive shell, run once only to avoid getting stuck.
974
fetch_check_connection () {
975
	while ! fetch ${QUIETFLAG} -o /dev/null \
976
	    http://${SERVERNAME}/${FETCHDIR}/latest.ssl 2>${QUIETREDIR}; do
977
                echo -n "failed. Waiting 60 seconds to retry... "
978
                sleep 60
979
                if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then
980
                        break
981
                fi
982
        done
983
}
984
972
# Fetch the mirror list, but do not pick a mirror yet.  Returns 1 if
985
# Fetch the mirror list, but do not pick a mirror yet.  Returns 1 if
973
# no mirrors are available for any reason.
986
# no mirrors are available for any reason.
974
fetch_pick_server_init () {
987
fetch_pick_server_init () {
Lines 1350-1355 Link Here
1350
		# Attempt to fetch metadata patches
1363
		# Attempt to fetch metadata patches
1351
		echo -n "Fetching `wc -l < patchlist | tr -d ' '` "
1364
		echo -n "Fetching `wc -l < patchlist | tr -d ' '` "
1352
		echo ${NDEBUG} "metadata patches.${DDSTATS}"
1365
		echo ${NDEBUG} "metadata patches.${DDSTATS}"
1366
		fetch_check_connection
1353
		tr '|' '-' < patchlist |
1367
		tr '|' '-' < patchlist |
1354
		    lam -s "${FETCHDIR}/tp/" - -s ".gz" |
1368
		    lam -s "${FETCHDIR}/tp/" - -s ".gz" |
1355
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1369
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
Lines 1402-1407 Link Here
1402
	if [ -s filelist ]; then
1416
	if [ -s filelist ]; then
1403
		echo -n "Fetching `wc -l < filelist | tr -d ' '` "
1417
		echo -n "Fetching `wc -l < filelist | tr -d ' '` "
1404
		echo ${NDEBUG} "metadata files... "
1418
		echo ${NDEBUG} "metadata files... "
1419
		fetch_check_connection
1405
		lam -s "${FETCHDIR}/m/" - -s ".gz" < filelist |
1420
		lam -s "${FETCHDIR}/m/" - -s ".gz" < filelist |
1406
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1421
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1407
		    2>${QUIETREDIR}
1422
		    2>${QUIETREDIR}
Lines 1790-1795 Link Here
1790
		done < files.wanted > filelist
1805
		done < files.wanted > filelist
1791
1806
1792
		# Actually fetch them
1807
		# Actually fetch them
1808
		fetch_check_connection
1793
		lam -s "${OLDFETCHDIR}/f/" - -s ".gz" < filelist |
1809
		lam -s "${OLDFETCHDIR}/f/" - -s ".gz" < filelist |
1794
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1810
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1795
		    2>${QUIETREDIR}
1811
		    2>${QUIETREDIR}
Lines 1889-1894 Link Here
1889
	if [ -s patchlist ]; then
1905
	if [ -s patchlist ]; then
1890
		echo -n "Fetching `wc -l < patchlist | tr -d ' '` "
1906
		echo -n "Fetching `wc -l < patchlist | tr -d ' '` "
1891
		echo ${NDEBUG} "patches.${DDSTATS}"
1907
		echo ${NDEBUG} "patches.${DDSTATS}"
1908
		fetch_check_connection
1892
		tr '|' '-' < patchlist |
1909
		tr '|' '-' < patchlist |
1893
		    lam -s "${PATCHDIR}/" - |
1910
		    lam -s "${PATCHDIR}/" - |
1894
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1911
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
Lines 1923-1928 Link Here
1923
	if [ -s filelist ]; then
1940
	if [ -s filelist ]; then
1924
		echo -n "Fetching `wc -l < filelist | tr -d ' '` "
1941
		echo -n "Fetching `wc -l < filelist | tr -d ' '` "
1925
		echo ${NDEBUG} "files... "
1942
		echo ${NDEBUG} "files... "
1943
		fetch_check_connection
1926
		lam -s "${FETCHDIR}/f/" - -s ".gz" < filelist |
1944
		lam -s "${FETCHDIR}/f/" - -s ".gz" < filelist |
1927
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1945
		    xargs ${XARGST} ${PHTTPGET} ${SERVERNAME}	\
1928
			2>${STATSREDIR} | fetch_progress
1946
			2>${STATSREDIR} | fetch_progress

Return to bug 235538