1

I need to automatically answer all dialoge (blue screenish Text GUI) questions when running dpkg-reconfigure exim4 as I have a bash script which will run on many servers.

Is there some way to automatically input text, press enter and select yes/no?

2 Answers2

1

Don't use dialogs, if it's just for dpkg.

Have a look at:

  • debconf-set-selections
  • DEBIAN_FRONTEND

http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html

allo
  • 1,813
0

dpkg-reconfigure exim4 is just an interface to easily create the text configuration files for exim. There is no advantage to finding a way to answer the questions automatically (if you did have to do that, expect would be a valid choice).

If you have a lot of servers you should provide or generate the files in /etc/exim directly. You could, for example, do this on one server, and the copy /etc/exim to the other servers. You just need to make sure that the hostname is taken from the real hostname and not overridden in the files.

Law29
  • 3,617
  • 1
  • 18
  • 30