modified error handling methods
[feisty_meow.git] / scripts / system / naive_system_updater.sh
index a6d65e969a1aff476929515b277b2f320fd579c7..cf9cbf898228ec2908c65cef9673fd5ce8aa4232 100644 (file)
@@ -2,9 +2,14 @@
 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 
 sudo apt-get update -y
-test_or_fail "problem while doing 'apt-get update'"
-# new magic to tell dpkg to go with existing config files.  let's see if it works!
-sudo apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"
-test_or_fail "problem while doing 'apt-get dist-upgrade'"
+exit_on_error "problem while doing 'apt-get update'"
+
+# newest magic to tell dpkg to go with existing config files and force non-interactive version.
+sudo bash -c "\
+  export DEBIAN_FRONTEND=noninteractive; \
+  apt-get dist-upgrade -y -o Dpkg::Options::=\"--force-confdef\" \
+     -o Dpkg::Options::=\"--force-confold\"; \
+"
+exit_on_error "problem while doing 'apt-get dist-upgrade'"