Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/freebsd-update/freebsd-update.sh
Show First 20 Lines • Show All 1,016 Lines • ▼ Show 20 Lines | |||||
# Pick a mirror. Returns 1 if we have run out of mirrors to try. | # Pick a mirror. Returns 1 if we have run out of mirrors to try. | ||||
fetch_pick_server () { | fetch_pick_server () { | ||||
# Generate a list of not-yet-tried mirrors | # Generate a list of not-yet-tried mirrors | ||||
sort serverlist_tried | | sort serverlist_tried | | ||||
comm -23 serverlist_full - > serverlist | comm -23 serverlist_full - > serverlist | ||||
# Have we run out of mirrors? | # Have we run out of mirrors? | ||||
if [ `wc -l < serverlist` -eq 0 ]; then | if [ `wc -l < serverlist` -eq 0 ]; then | ||||
echo "No mirrors remaining, giving up." | cat <<- EOF | ||||
No mirrors remaining, giving up. | |||||
This may be because upgrading from this platform (${ARCH}) | |||||
or release (${RELNUM}) is unsupported by `basename $0`. Only | |||||
platforms with Tier 1 support can be upgraded by `basename $0`. | |||||
See https://www.freebsd.org/platforms/index.html for more info. | |||||
If unsupported, FreeBSD must be upgraded by source. | |||||
EOF | |||||
return 1 | return 1 | ||||
fi | fi | ||||
# Find the highest priority level (lowest numeric value). | # Find the highest priority level (lowest numeric value). | ||||
SRV_PRIORITY=`cut -f 1 -d ' ' serverlist | sort -n | head -1` | SRV_PRIORITY=`cut -f 1 -d ' ' serverlist | sort -n | head -1` | ||||
# Add up the weights of the response lines at that priority level. | # Add up the weights of the response lines at that priority level. | ||||
SRV_WSUM=0; | SRV_WSUM=0; | ||||
▲ Show 20 Lines • Show All 2,305 Lines • Show Last 20 Lines |