为什么即使指定了force-confdef/force-confold,libpam-systemd也会在apt升级时以交互方式运行

为什么即使指定了force-confdef/force-confold,libpam-systemd也会在apt升级时以交互方式运行

我使用 aptitude 升级我的软件包,指定 apt 选项--force-confdef--force-confold.

这通常有效,但包libpam-systemd(204-5ubuntu20.8,在 Ubuntu 14.04 上)仍然询问我是否要替换(修改后的)配置文件。

当对话框打开时,我可以看到以下进程:

  • /usr/bin/dpkg --force-confdef --status-fd 113 --configure libpam-systemd:amd64
  • /bin/sh /var/lib/dpkg/info/libpam-systemd:amd64.postinst configure 204-5ubuntu20.7
  • whiptail --backtitle Package configuration --title PAM configuration --output-fd 11 --defaultno --yesno -- One or more of the files /etc/pam.d/common-{auth,account,password,session} have been locally modified. Please indicate whether these local changes should be overridden using the system-provided configuration. If you decline this option, you will need to manage your system's authentication configuration by hand. Override local changes to /etc/pam.d/common-*? 10 200

我该怎么做才能以非交互方式运行升级?

答案1

事实证明,此类配置文件是通过不同的系统处理的:

The whiptail prompts are done through debconf, which means that a DEBIAN_FRONTEND=none setting will give you the desired results for a non-interactive upgrade.

因此,为了以非交互方式升级,我们必须使用DEBIAN_FRONTEND=none.

相关内容