From ba8c2999c469eefa052934249e647b449a109047 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Thu, 6 Jun 2013 17:46:05 -0300 Subject: [PATCH] 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. --- scripts/install-system-req.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/install-system-req.sh b/scripts/install-system-req.sh index 43e405524d..39f1ec9f6f 100755 --- a/scripts/install-system-req.sh +++ b/scripts/install-system-req.sh @@ -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"