]> git.donarmstrong.com Git - neurodebian.git/commitdiff
ENH: use -I for netselect where available (ICMP is more likely to be allowed to reach...
authorYaroslav Halchenko <debian@onerussian.com>
Fri, 27 Jun 2014 18:51:38 +0000 (14:51 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Fri, 27 Jun 2014 18:51:38 +0000 (14:51 -0400)
tools/nd-aptenable

index 2d4c36e15f6094aa667077cb1e6f2d7df2c07afa..0bf694836dcb72a3d65e4e214948d5afb99b70d0 100755 (executable)
@@ -236,9 +236,13 @@ netselect_mirror() {
     else
         # squeeze version doesn't have -D yet to force output of the URL not IP, but for our mirrors ATM it shouldn't matter
         netselect_opts="-s 1"
-        if dpkg --compare-versions $(get_package_version netselect) ge 0.3.ds1-17; then
+        netselect_version="$(get_package_version netselect)"
+        if dpkg --compare-versions "$netselect_version" ge 0.3.ds1-17; then
             netselect_opts+=" -D"
         fi
+        if dpkg --compare-versions "$netselect_version" ge 0.3.ds1-15; then
+            netselect_opts+=" -I"
+        fi
         best_mirror=$(get_mirrors | awk '{print $2;}' | eval $ae_sudo xargs netselect $netselect_opts | awk '{print $2;}')
         print_verbose 2 "Best mirror: $best_mirror"
         echo $best_mirror