我一直在努力制作包裹无人值守升级在 Debian GNU/Linux (7.0) 下运行,但目前没有成功。
我遵循的步骤:
- 安装无人值守升级
启用它
sudo dpkg-reconfigure -plow unattended-upgrades
取消注释以下几行/etc/apt/apt.conf.d/50unattended-upgrades
"o=Debian,n=wheezy"; "o=Debian,n=wheezy-updates"; "o=Debian,n=wheezy-proposed-updates"; "o=Debian,n=wheezy,l=Debian-Security";
等两天
它应该每天运行,但到那时它什么也没做。我检查了它的日志/var/log/无人值守升级/并记录历史/var/log/apt/history.log但自安装以来那里什么也没有发生。
我是否遗漏了启用该功能的任何步骤?阅读下面的文档后/usr/share/doc/无人值守升级/自述文件,我认为您只需遵循上述内容即可使其运行。
答案1
尝试这个:
Unattended-Upgrade::Origins-Pattern {
"o=Debian,a=testing";
"o=Debian,a=stable";
"o=Debian,a=stable-updates";
"o=Debian,a=proposed-updates";
"origin=Debian,archive=stable,label=Debian-Security";
};
文件 /etc/apt/apt.conf.d/20auto-upgrades 必须包含:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";