![我们可以扩展启用了无人值守升级的存储库吗?](https://linux22.com/image/1124663/%E6%88%91%E4%BB%AC%E5%8F%AF%E4%BB%A5%E6%89%A9%E5%B1%95%E5%90%AF%E7%94%A8%E4%BA%86%E6%97%A0%E4%BA%BA%E5%80%BC%E5%AE%88%E5%8D%87%E7%BA%A7%E7%9A%84%E5%AD%98%E5%82%A8%E5%BA%93%E5%90%97%EF%BC%9F.png)
关于为某些存储库启用无人值守升级的通常建议是编辑/etc/apt/apt.conf.d/50unattended-upgrades
并手动添加适当的Origin
值。我想知道是否可以通过指定多个块来添加到此列表中Unattended-Upgrade::Allowed-Origins
,或者任何后续块是否会覆盖先前的块?
用例是本地存储库,通过安装包将其添加到系统中。我想通过向99local_repo_conf
包中添加文件来启用无人值守升级,其中的Unattended-Upgrade::Allowed-Origins
块包含该存储库的 Origin 数据。这样的块会覆盖以前的条目并阻止 Ubuntu 存储库的无人值守升级吗?
显然,尽管我找不到任何相关文档,但这确实是行为。
$ cat /etc/apt/apt.conf.d/*upgrades*
Unattended-Upgrade::Allowed-Origins {
"CSE:trusty";
};
Unattended-Upgrade::Automatic-Reboot-Time "05:00";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}-security";
};
...
$ sudo unattended-upgrade --dry-run --debug
Initial blacklisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=CSE,a=trusty', 'o=Ubuntu,a=trusty-security']
pkgs that look like they should be upgraded:
...
当然,条目连接的事实可能是 APT 的配置语法的属性,相关文档unattended-upgrade
不需要提及它。
有人可以提供文件来证实这一点吗?