debconf 忽略我的默认答案

DeL*_*VaN 5 debian 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    
Run Code Online (Sandbox Code Playgroud)

你知道如何debconf忽略我的设置选择吗?我尝试直接编辑/var/cache/debconf/config.dat并尝试使用DEBCONF_DB_OVERRIDE,这些方法都不起作用

我使用的是 debian 7.6,全新的 netinst 安装。

有任何想法吗 ?

DeL*_*VaN 4

好吧,正如 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