summaryrefslogtreecommitdiffstats
path: root/inst
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-06 14:24:11 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-06 14:24:11 (EST)
commitdfb8e89a1409e2e165e1acd7ec53b27c19d47b50 (patch)
tree5563472b90d497f9adbb9030ba930aa32833e5dc /inst
parent3898ba34510fcd8b90a8387556cc893e69c05983 (diff)
downloadpc-inst-dfb8e89a1409e2e165e1acd7ec53b27c19d47b50.zip
pc-inst-dfb8e89a1409e2e165e1acd7ec53b27c19d47b50.tar.gz
pc-inst-dfb8e89a1409e2e165e1acd7ec53b27c19d47b50.tar.bz2
Try running apt-get three times
Sometimes a mirror server will close the connection before sending a response.
Diffstat (limited to 'inst')
-rwxr-xr-xinst10
1 files changed, 8 insertions, 2 deletions
diff --git a/inst b/inst
index 36dde95..a9e0f3f 100755
--- a/inst
+++ b/inst
@@ -356,11 +356,17 @@ do_debconf_setup()
do_install_extra()
{
+ local i=
+
info 'Installing extra packages'
- in_target apt-get -q -y install ${postinst_pkgs} || return 1
+ i=0
+ while [ ${i} -lt 3 ]; do
+ in_target apt-get -q -y install ${postinst_pkgs} && return 0
+ i=$((${i} + 1))
+ done
- return 0
+ return 1
}
do_chroot_cleanup()