我正在使用无人值守的升级,我想在内核升级时自动重新启动。
这有可能吗?
发布于 2022-04-10 12:33:17
在无人值守的升级升级/安装了需要重新启动的东西之后,您可以设置自动重新启动。这包括安装新内核。
相关配置变量:
// 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
https://askubuntu.com/questions/1401765
复制相似问题