Commit f7b18f26 authored by Jeff Bilyk's avatar Jeff Bilyk Committed by Ariadne Conill

remove bind-tools dependency

nslookup statement needed bind-tools version of nslookup, not busybox
parent 325534f0
......@@ -64,23 +64,19 @@ get_fastest_mirror() {
mirror_lowest_rtt=-1
for mirror in $MIRRORS; do
mirror_hostname=`echo $mirror | awk -F '://' '{print $2}' | awk -F '/' '{print $1}'`
tmp_mirror_nslookup=`nslookup $mirror_hostname | grep "Non-authoritative answer"`
if [ ${#tmp_mirror_nslookup} -gt 0 ]; then
tmp_mirror_time="`(time wget -qO - $mirror) 2>&1 || echo "E_MIRROR_FAILED"`"
tmp_mirror_time_failed=`echo $tmp_mirror_time | grep "E_MIRROR_FAILED"`
if [ ${#tmp_mirror_time_failed} -eq 0 ]; then
tmp_mirror_rtt=`echo "$tmp_mirror_time" | grep -E "^real" | sed -r "s/^real[ ]+[0-9]+m[ ]+([0-9]+)\.([0-9]+)s$/\1\2/"`
if [ $mirror_lowest_rtt -eq -1 ]; then
tmp_mirror_time="`(time wget -qO - $mirror) 2>&1 || echo "E_MIRROR_FAILED"`"
tmp_mirror_time_failed=`echo $tmp_mirror_time | grep "E_MIRROR_FAILED"`
if [ ${#tmp_mirror_time_failed} -eq 0 ]; then
tmp_mirror_rtt=`echo "$tmp_mirror_time" | grep -E "^real" | sed -r "s/^real[ ]+[0-9]+m[ ]+([0-9]+)\.([0-9]+)s$/\1\2/"`
if [ $mirror_lowest_rtt -eq -1 ]; then
mirror_lowest_rtt=$tmp_mirror_rtt
mirror_lowest_rtt_hostname=$mirror_hostname
mirror_lowest_rtt_mirror=$mirror
else
if [ $tmp_mirror_rtt -lt $mirror_lowest_rtt ]; then
mirror_lowest_rtt=$tmp_mirror_rtt
mirror_lowest_rtt_hostname=$mirror_hostname
mirror_lowest_rtt_mirror=$mirror
else
if [ $tmp_mirror_rtt -lt $mirror_lowest_rtt ]; then
mirror_lowest_rtt=$tmp_mirror_rtt
mirror_lowest_rtt_hostname=$mirror_hostname
mirror_lowest_rtt_mirror=$mirror
fi
fi
fi
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment