summaryrefslogtreecommitdiff
path: root/setup-apkrepos.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-27 11:33:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-27 11:33:42 +0000
commit625a07f49ca1699b6b4ad2257b7761c797b1e959 (patch)
treea7c4b322815869bf01070dec4f4c78b763e0578d /setup-apkrepos.in
parent30320091dfab9782a9bca7f6d4b5e085a7610aa0 (diff)
downloadalpine-conf-625a07f49ca1699b6b4ad2257b7761c797b1e959.zip
setup-apkrepos: do not add empty mirrors
ref #1073
Diffstat (limited to 'setup-apkrepos.in')
-rwxr-xr-xsetup-apkrepos.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 69de693..df97bc5 100755
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -60,6 +60,10 @@ add_fastest_mirror() {
fi
done
mirror=$mirror_lowest_rtt_mirror
+ if [ -z "$mirror" ]; then
+ eecho "Failed to ping any mirror"
+ return 1
+ fi
add_mirror "$mirror"
}