From 98f0ba33d2d425bcf3528328b7f7d9062db3b129 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 17 Jan 2020 09:21:39 +0100 Subject: [PATCH] setup: prevent prompt during install This should prevent debconf from asking questions during install. Presumably, the exported env variable DEBIAN_FRONTEND is not taken into account in a sudo command, hence we need to add it every time. --- Tools/setup/ubuntu.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index 96a262b2db..6280d96e48 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -32,7 +32,7 @@ done # detect if running in docker if [ -f /.dockerenv ]; then echo "Running within docker, installing initial dependencies"; - apt-get --quiet -y update && apt-get --quiet -y install \ + apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \ ca-certificates \ gnupg \ lsb-core \ @@ -67,14 +67,11 @@ elif [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then fi - -export DEBIAN_FRONTEND=noninteractive - echo echo "Installing PX4 general dependencies" -sudo apt-get update -yy --quiet -sudo apt-get -yy --quiet --no-install-recommends install \ +sudo apt-get update -y --quiet +sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ astyle \ build-essential \ ccache \ @@ -120,7 +117,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then echo echo "Installing NuttX dependencies" - sudo apt-get -yy --quiet --no-install-recommends install \ + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ autoconf \ automake \ bison \ @@ -176,7 +173,7 @@ if [[ $INSTALL_SIM == "true" ]]; then echo "Installing PX4 simulation dependencies" # java (jmavsim or fastrtps) - sudo apt-get -yy --quiet --no-install-recommends install \ + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ ant \ openjdk-8-jre \ openjdk-8-jdk \ @@ -185,8 +182,7 @@ if [[ $INSTALL_SIM == "true" ]]; then # Gazebo sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - - sudo apt-get update -yy --quiet - sudo DEBIAN_FRONTEND=noninteractive apt-get -yy --quiet --no-install-recommends install \ + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ gazebo9 \ gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-base \