From: Chris Koeritz Date: Wed, 21 Mar 2018 01:49:31 +0000 (-0400) Subject: more accurate solution for non-interactive update X-Git-Tag: 2.140.110^2~2 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=9ec7a5da5c1dfc0ca264e2e166f2c19bcf4a51b2;p=feisty_meow.git more accurate solution for non-interactive update should work now, if the reference sites are right about the variable for non-interactive. the var was not passed in before since sudo is not like a sub-shell. now the two pieces needed, setting the var and running command that listens to var, are done in a single multi-line bash command. --- diff --git a/scripts/system/naive_system_updater.sh b/scripts/system/naive_system_updater.sh index 3bd16a28..7790fe88 100644 --- a/scripts/system/naive_system_updater.sh +++ b/scripts/system/naive_system_updater.sh @@ -3,9 +3,13 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" sudo apt-get update -y test_or_die "problem while doing 'apt-get update'" + # newest magic to tell dpkg to go with existing config files and force non-interactive version. -export DEBIAN_FRONTEND=noninteractive -sudo apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" +sudo bash -c "\ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get dist-upgrade -y -o Dpkg::Options::=\"--force-confdef\" \ + -o Dpkg::Options::=\"--force-confold\"; \ +" test_or_die "problem while doing 'apt-get dist-upgrade'"