小编Mar*_*ino的帖子

尝试用脚本取消注释无人值守升级行,需要帮助

我最近开始在一家全 Linux 公司担任 IT 人员,并注意到我们所做的一些任务可以“轻松”自动化。今天的自动化任务是/etc/apt/apt.config.d/50unattended-upgrades在新计算机上安装软件和配置。我已经编写了软件安装脚本,但现在我一直坚持取消注释所需的无人值守升级行。

我给你举个例子,这个:

// Automatically upgrade packages from these (origin:archive) pairs
//
// Note that in Ubuntu security updates may pull in new dependencies
// from non-security sources (e.g. chromium). By allowing the release
// pocket these get automatically pulled in.
Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}";
        "${distro_id}:${distro_codename}-security";
        // Extended Security Maintenance; doesn't necessarily exist for
        // every release and this system may not have it installed, but if
        // available, the policy for updates is such that …
Run Code Online (Sandbox Code Playgroud)

bash sed unattended-upgrades text-processing

3
推荐指数
2
解决办法
834
查看次数

标签 统计

bash ×1

sed ×1

text-processing ×1

unattended-upgrades ×1