首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >升级内核时自动重新启动

升级内核时自动重新启动
EN

Ask Ubuntu用户
提问于 2022-04-10 09:55:23
回答 1查看 753关注 0票数 0

我正在使用无人值守的升级,我想在内核升级时自动重新启动。

这有可能吗?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2022-04-10 12:33:17

在无人值守的升级升级/安装了需要重新启动的东西之后,您可以设置自动重新启动。这包括安装新内核。

相关配置变量:

代码语言:javascript
复制
// Automatically reboot *WITHOUT CONFIRMATION* if
//  the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";

// Automatically reboot even if there are users currently logged in
// when Unattended-Upgrade::Automatic-Reboot is set to true
//Unattended-Upgrade::Automatic-Reboot-WithUsers "true";

// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
//  Default: "now"
//Unattended-Upgrade::Automatic-Reboot-Time "02:00";

将您的首选设置保存在文件/etc/apt/apt.conf.d/52unattended-upgrades-local中(这样您就不必修改由包提供的50次无人参与的升级)。

您可以看到通过apt-config dump unattended-upgrade显式设置配置值。

不幸的是,您不能列出所有当前值。https://github.com/mvo5/unattended-upgrades/issues/245

您可以在https://github.com/mvo5/unattended-upgrades上看到更多的文档(最新版本)。

不幸的是,并不是所有受支持的选项都在这里解释:https://github.com/mvo5/unattended-upgrades/issues/246 https://github.com/mvo5/unattended-upgrades/issues/318

票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1401765

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档