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?
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?
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.
Don't use dialogs, if it's just for dpkg.
Have a look at:
http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html