From 4f9349b576166cca1c3906ecfce9331bed822133 Mon Sep 17 00:00:00 2001 From: Orazio Date: Tue, 27 Oct 2020 08:52:51 +0100 Subject: [PATCH] Log debconf-apt-progress output to show errors in case of failed package install --- auto_install/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 0db151f..c3a1e7d 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -552,9 +552,11 @@ installDependentPackages(){ fi done + local APTLOGFILE="$(mktemp)" + if command -v debconf-apt-progress > /dev/null; then # shellcheck disable=SC2086 - $SUDO debconf-apt-progress -- ${PKG_INSTALL} "${TO_INSTALL[@]}" + $SUDO debconf-apt-progress --logfile "${APTLOGFILE}" -- ${PKG_INSTALL} "${TO_INSTALL[@]}" else # shellcheck disable=SC2086 $SUDO ${PKG_INSTALL} "${TO_INSTALL[@]}" @@ -574,6 +576,7 @@ installDependentPackages(){ done if [ "$FAILED" -gt 0 ]; then + cat "${APTLOGFILE}" exit 1 fi }