summaryrefslogtreecommitdiffstats
path: root/build-root/vagrant
diff options
context:
space:
mode:
authorRay Kinsella <ray.kinsella@intel.com>2016-12-21 14:25:40 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-21 17:05:27 +0000
commit1a9b5b71cddac0a26d788f8d1e66076666087888 (patch)
tree2f704127ec63fd28a311439a74eb556c393ae783 /build-root/vagrant
parent85bdafacbdd25f88c06076ca7208ff14fe10b74c (diff)
vagrant: Fixing sudo related vagrant errors
The dpkg sudo trigger appears to want to run interactively despite the noninteractive debconf setting. This is a problem upstream for vagrant also, see. https://github.com/hashicorp/terraform/issues/9763 Incorporating the recommended fix to Vagrantfile from upstream https://github.com/hashicorp/terraform/pull/9783 Change-Id: I8da8522fc9e80fc3bd268b347a786054ad019170 Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Diffstat (limited to 'build-root/vagrant')
-rwxr-xr-xbuild-root/vagrant/update.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/build-root/vagrant/update.sh b/build-root/vagrant/update.sh
index 77bf49a7..2a377398 100755
--- a/build-root/vagrant/update.sh
+++ b/build-root/vagrant/update.sh
@@ -25,21 +25,24 @@ fi
# Do initial setup for the system
if [ $DISTRIB_ID == "Ubuntu" ]; then
- # Fix grub-pc on Virtualbox with Ubuntu
+
+ export DEBIAN_PRIORITY=critical
export DEBIAN_FRONTEND=noninteractive
+ export DEBCONF_NONINTERACTIVE_SEEN=true
+ APT_OPTS="--assume-yes --no-install-suggests --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\""
# Standard update + upgrade dance
- apt-get update
- apt-get upgrade -y
+ apt-get update ${APT_OPTS} >/dev/null
+ apt-get upgrade ${APT_OPTS} >/dev/null
# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
update-alternatives --install /bin/sh sh /bin/bash 100
# Install useful but non-mandatory tools
- apt-get install -y emacs git-review gdb gdbserver
+ apt-get install -y emacs git-review gdb gdbserver
elif [ $DISTRIB_ID == "CentOS" ]; then
# Standard update + upgrade dance
yum check-update
yum update -y
-fi \ No newline at end of file
+fi