我希望脚本能够apt-get upgrade
无缝运行而无需提示,但在我的实验中,我无法让它停止显示提示,即使使用-y
或--force yes
。最近,当从头开始设置 RPis 时,这是一个示例违规者,我只需点击它即可q
继续升级:
ca-certificates (20141019+deb8u2) stable; urgency=medium
Update Mozilla certificate authority bundle to version 2.9.
The following certificate authorities were added (+):
+ "Certplus Root CA G1"
+ "Certplus Root CA G2"
+ "Certum Trusted Network CA 2"
+ "Hellenic Academic and Research Institutions ECC RootCA 2015"
+ "Hellenic Academic and Research Institutions RootCA 2015"
+ "ISRG Root X1"
+ "OpenTrust Root CA G1"
+ "OpenTrust Root CA G2"
+ "OpenTrust Root CA G3"
+ "SZAFIR ROOT CA2"
The following certificate authorities were removed (-):
- "CA Disig"
- "NetLock Business (Class B) Root"
- "NetLock Express (Class C) Root"
- "NetLock Notary (Class A) Root"
- "NetLock Qualified (Class QA) Root"
- "Sonera Class 1 Root CA"
- "Staat der Nederlanden Root CA"
- "Verisign Class 1 Public Primary Certification Authority - G2"
- "Verisign Class 3 Public Primary Certification Authority"
- "Verisign Class 3 Public Primary Certification Authority - G2"
-- Michael Shuler <[email protected]> Fri, 18 Nov 2016 09:09:47 -0600
老实说,即使我手动运行该程序,这也很烦人,因为它可能需要几分钟,然后我就会离开,希望回来完成一项任务,却发现它中途暂停了。
我看到了一些关于使它更安静的-qq
东西,但我有点担心它可能会覆盖与默认值不同的配置文件(虽然很烦人,但我发现这是可以接受的)。
所以,说实话,我甚至不知道如何提出正确的问题——我只希望这个提示消失。
答案1
您看到的输出来自apt-listchanges
包,它不是默认的。有多种方法可以防止更改暂停更新过程:
APT_LISTCHANGES_FRONTEND=cat
在环境中设置- 在部分下编辑
/etc/apt/listchanges.conf
并设置frontend=cat
apt
- 卸载
apt-listchanges
包
答案2
根据“apt-listchanges”手册,您可以使用不同的前端配置 apt。要将更改日志打印到标准输出,您应该使用“text”前端。您还可以使用“none”前端隐藏更改日志。