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

Dan*_*ral 7 debian exim aptitude puppet apt

我需要通过 puppet 安装 exim4。因为这个安装需要交互配置,所以需要一个响应文件,但是不知道怎么生成。那么,如何生成响应文件呢?

Zor*_*che 10

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

debconf-get-selections | grep exim4-config
exim4-config    exim4/dc_noalias_regenerate boolean false
exim4-config    exim4/dc_smarthost  string  
...
Run Code Online (Sandbox Code Playgroud)

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