From 625a07f49ca1699b6b4ad2257b7761c797b1e959 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Sun, 27 May 2012 11:33:42 +0000 Subject: [PATCH] setup-apkrepos: do not add empty mirrors ref #1073 --- setup-apkrepos.in | 4 ++++ 1 file changed, 4 insertions(+) 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" } -- 1.7.10.2