debconf 忽略了我的默认答案

debconf 忽略了我的默认答案

我正在尝试设置默认答案以debconf自动化 exim 配置。我正在使用设置新值debconf-set-selections,但debconf忽略了它。我很困惑。以下是我的问题的简短复制/粘贴:

root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  mail sent by smarthost; no local mail
root@vm-iwd:/var/cache/debconf# echo "exim4-config exim4/dc_eximconfig_configtype select internet site; mail is sent and received directly using SMTP" | debconf-set-selections
root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  internet site; mail is sent and received directly using SMTP
root@vm-iwd:/var/cache/debconf# dpkg-reconfigure exim4-config -fnoninteractive
[ ok ] Stopping MTA for restart: exim4_listener.
[ ok ] Restarting MTA: exim4.
root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  mail sent by smarthost; no local mail    

你看这debconf是如何忽略我的集合选择的?我尝试直接编辑/var/cache/debconf/config.dat并尝试使用DEBCONF_DB_OVERRIDE,但这些方法都不起作用

我在 debian 7.6 上,全新安装 netinst。

有任何想法吗 ?

答案1

好的,正如 Zoredache 所说,修改 debconf 默认答案不是解决方案。

因此,为了更改我的配置,我执行以下操作:

  • 更改 /etc/exim4/update-exim4.conf.conf (例如sed -i "s/dc_eximconfig_configtype=.*/dc_eximconfig_configtype='internet'/" /etc/exim4/update-exim4.conf.conf)
  • 跑步dpkg-reconfigure exim4-config -fnoninteractive

相关内容