install-aws-server: Force non-interactive dist-upgrade.

Installing an updated linux kernel package, as can happen during the
`apt dist-upgrade` done by the installer, can cause grub to pop up a
prompt to update its configuration file.  In an unattended headless
configuration, this will stop the installation.

Explicitly configure apt to be non-interactive, and prefer the newest
configuration, during the install.
This commit is contained in:
Alex Vandiver 2020-10-15 07:29:38 +00:00 committed by Tim Abbott
parent 449b16be59
commit 0d5760d59f
1 changed files with 5 additions and 3 deletions

View File

@ -30,9 +30,11 @@ passwd -d root
# Allow root logins
sed -i 's/disable_root: true/disable_root: false/' /etc/cloud/cloud.cfg
# Ensure all apt updates (here and in the installer) are non-interactive
export DEBIAN_FRONTEND=noninteractive
# Dependencies to install AWS CLI
(
export DEBIAN_FRONTEND=noninteractive
apt-get -qy update
apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade
apt-get -qy install jq unzip wget
@ -82,8 +84,8 @@ git -C zulip checkout "$BRANCH"
(
VIRTUALENV_NEEDED=$(if echo "$ROLES" | grep -q app_frontend; then echo -n yes; else echo -n no; fi)
export VIRTUALENV_NEEDED
PUPPET_CLASSES="$ROLES"
export PUPPET_CLASSES
export PUPPET_CLASSES="$ROLES"
export APT_OPTIONS="-o Dpkg::Options::=--force-confnew"
/root/zulip/scripts/setup/install \
--self-signed-cert \
--no-init-db