1

Running a script that install mysql through phing ssh task give me this output :

debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 

If I run the same script after log-in through ssh, it runs without any errors :

The script responsible is I think (setup.sh):

export DEBIAN_FRONTEND=noninteractive
echo "mysql-server mysql-server/root_password password $rootPwd" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password $rootPwd" | sudo debconf-set-selections
sudo apt-get install -y mysql-server mysql-client

And this happens for the first time only. If I run the script twice it execute perfectly.

Phing task just for reference:

 <ssh host="${deploy.host}"
             username="${deploy.user}"
             privkeyfile="${deploy.pem}"
             pubkeyfile="${deploy.pub}"
             command="./setup.sh"
             display="false"
             property="ssh_output"
             failonerror="true"
                />
sakhunzai
  • 13,900
  • 23
  • 98
  • 159
  • 2
    `Dialog frontend will not work on a dumb terminal` says it all. the installer tries to pop up a dialog to prompt for some options, and can't, because it's not being run from an interactive terminal. – Marc B Nov 24 '14 at 15:35
  • @MarcB but `export DEBIAN_FRONTEND=noninteractive` should tell it to be non-interactive ? – sakhunzai Nov 25 '14 at 05:15

0 Answers0