如何生成与apt-get或aptitude一起使用的响应文件?

我需要通过木偶安装exim4。 由于此安装需要交互式configuration,因此我需要一个响应文件,但是我不知道如何生成一个响应文件。 那么,我如何生成一个响应文件?

在运行apt-get之前,使用debconf-set-selections预先填充configuration数据库。 您可以在configuration的系统上使用debconf-get-selections(在debconf-utils中)来查看需要设置的内容。 另外请记住,使用exim,实际需要configuration的软件包是exim4-config。

debconf-get-selections | grep exim4-config exim4-config exim4/dc_noalias_regenerate boolean false exim4-config exim4/dc_smarthost string ... 

另见http://wiki.debian.org/DebianInstaller/Preseed