Install: Fix use of DEBIAN_FRONTEND - sudo clears environment

Before executing a command, for security reasons `sudo` clears the
environment, so the value of DEBIAN_FRONTEND was never passed to
apt-get. This was causing the mysql packqge to still prompt for
a value interactively.
This commit is contained in:
Xavier Antoviaque
2013-06-06 17:46:05 -03:00
committed by David Baumgold
parent dcaed88cb2
commit ba8c2999c4

View File

@@ -35,18 +35,13 @@ case `uname -s` in
squeeze|wheezy|jessie|maya|lisa|olivia|nadia|natty|oneiric|precise|quantal|raring)
output "Installing Debian family requirements"
# DEBIAN_FRONTEND=noninteractive is required for silent mysql-server installation
export DEBIAN_FRONTEND=noninteractive
# add repositories
cat $APT_REPOS_FILE | xargs -n 1 sudo add-apt-repository -y
sudo apt-get -y update
sudo apt-get -y install gfortran
sudo apt-get -y install graphviz libgraphviz-dev graphviz-dev
sudo apt-get -y install libatlas-dev libblas-dev
sudo apt-get -y install ruby-rvm
sudo apt-get -yq update
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install gfortran graphviz \
libgraphviz-dev graphviz-dev libatlas-dev libblas-dev ruby-rvm
# install packages listed in APT_PKGS_FILE
cat $APT_PKGS_FILE | xargs sudo apt-get -y install
cat $APT_PKGS_FILE | xargs sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install
;;
*)
error "Unsupported distribution - $distro"