From f5cc9524c4f806239ecce069d154344347b01e54 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 10 Sep 2016 22:13:15 -0400 Subject: erp1: Try up to three times to install packages --- (limited to 'hosts/erp1') 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" -- cgit v0.9.1