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

Re: "Service restarts being deferred"



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.

-dsr-


Reply to: