summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-09-10 22:13:15 (EDT)
committer P. J. McDermott <pj@pehjota.net>2016-09-10 22:13:15 (EDT)
commitf5cc9524c4f806239ecce069d154344347b01e54 (patch)
treefaaa861f49203d60da16435224ce618eef8c3fae /hosts
parent71d2aefe3e8f77668051d3dbc658a695ec06363a (diff)
downloadpc-inst-f5cc9524c4f806239ecce069d154344347b01e54.zip
pc-inst-f5cc9524c4f806239ecce069d154344347b01e54.tar.gz
pc-inst-f5cc9524c4f806239ecce069d154344347b01e54.tar.bz2
erp1: Try up to three times to install packages
Diffstat (limited to 'hosts')
-rw-r--r--hosts/erp18
1 files changed, 6 insertions, 2 deletions
diff --git a/hosts/erp1 b/hosts/erp1
index aedb682..59cbced 100644
--- a/hosts/erp1
+++ b/hosts/erp1
@@ -91,7 +91,9 @@ do_postinst()
wget -O - https://apt.ledgersmb.org/apt-ledgersmb-org_public-key.asc | \
in_target apt-key add - || return 1
in_target apt-get update || return 1
- in_target apt-get -q -y install ledgersmb || return 1
+ i=0; while [ ${i} -lt 3 ]; do i=$((${i} + 1))
+ in_target apt-get -q -y install ledgersmb && break
+ done || return 1
# Install Odoo.
info 'Installing Odoo'
@@ -102,7 +104,9 @@ do_postinst()
wget -O - https://nightly.odoo.com/odoo.key | \
in_target apt-key add - || return 1
in_target apt-get update || return 1
- in_target apt-get -q -y install odoo || return 1
+ i=0; while [ ${i} -lt 3 ]; do i=$((${i} + 1))
+ in_target apt-get -q -y install odoo && break
+ done || return 1
# Enable services.
rm -f "${target}/usr/sbin/policy-rc.d"