Jesper Dybdal wrote:
I run Buster with unattended updates configured to allow reboots.
Sometimes after an update, the log contains:
Service restarts being deferred:
??systemctl restart systemd-logind.service
??systemctl restart unattended-upgrades.service
>From the documentation of Automatic-Reboot, it only has effect for
updates that result in the /var/run/reboot-required file being created.
For service restarts, the needrestart configuration would be a better
place to start. The comments in /etc/needrestart/needrestart.conf are
instructive:
# do not restart oneshot services, see also #862840
qr(^apt-daily\.service$) => 0,
qr(^apt-daily-upgrade\.service$) => 0,
qr(^unattended-upgrades\.service$) => 0,
# don't restart systemd-logind, see #798097
qr(^systemd-logind) => 0,
Do go through those bug reports and experiment at a safe time before
changing things here.