[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "Service restarts being deferred"





On 2020-12-19 17:14, Dan Ritter wrote:
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
I don't understand why these services are not restarted, if necessary
through a reboot.

I want my system to be able to run truly unattended for a long time, so
necessary restarts should be done without waiting for manual intervention.??
And if the restarts are not necessary, why are they there at all, though
deferred?

So what have I misunderstood?
In your /etc/apt/apt.conf.d,  edit a file named 50unattended-upgrades

// Automatically reboot *WITHOUT CONFIRMATION* if
//  the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";

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

Without those two lines, you get the behavior you currently
have.

Not everyone wants automatic reboots; not everyone wants
automatic reboots even with someone logged in.

Thanks.
I already have Automatic-Reboot set, and it correctly causes reboot after for instance kernel upgrades. I do not have Automatic-Reboot-WithUsers set, since I did not imagine it would make a difference when there actually are no users logged in.
But I'll try setting it also and see if that somehow makes a difference.

--
Jesper Dybdal
https://www.dybdal.dk


Reply to: