From 444b3f9c05e921f4e1c443487a08eedc79909b04 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Thu, 20 Jun 2019 13:59:31 +0900 Subject: [PATCH] fix: [installer] Currently misp-packer fails on waiting for user input during upgrade --- docs/INSTALL.ubuntu1804.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/INSTALL.ubuntu1804.md b/docs/INSTALL.ubuntu1804.md index 588745ca1..5f0504a2d 100644 --- a/docs/INSTALL.ubuntu1804.md +++ b/docs/INSTALL.ubuntu1804.md @@ -46,7 +46,16 @@ aptUpgrade () { debug "Upgrading system" checkAptLock sudo apt-get update - sudo apt-get upgrade -qy + + # If we run in non-interactive mode, make sure we do not stop all of a sudden + if [[ "${PACKER}" == "1" || "${UNATTENDED}" == "1" ]]; then + export DEBIAN_FRONTEND=noninteractive + export DEBIAN_PRIORITY=critical + sudo -E apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade + sudo -E apt-get -qy autoclean + else + sudo apt-get upgrade -qy + fi } # ```