0

18.04LTS here.

In my /etc/apt/apt.conf.d/50unattended-upgrades I have:

Unattended-Upgrade::Automatic-Reboot "true";

At the same time, /var/run/reboot-required exists.

When I exit the server and ssh in again, I can see * * * System restart required * * *.

So as far as I can see, the upgrading of packages using apt-get should now trigger an immediate restart if the restart is required, which I know it is (see above two reasons why I believe it is required).

However, I can't trigger the automatic reboot - I would expect it to be triggered by sudo apt-get upgrade but the command succeeds successfully and no restart happens.

What am I missing please?

Many thanks!

Contents of /etc/apt/apt.conf.d/20auto-upgrades :

APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade 1; APT::Periodic::Download-Upgradeable-Packages "0"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::CleanInterval "7"; APT::Periodic::Verbose "0";

Contents of /etc/apt/apt.conf.d/50unattended-upgrades : Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot-Time "+0";

0

You need to have update-notifier-common installed. This is not installed on minimal server installs by default

| improve this answer | |
  • I do have it installed... – MartinH Dec 9 '19 at 17:17
  • what is the conents of /etc/apt/apt.conf.d/20auto-upgrades – stratus Dec 9 '19 at 17:46
  • have you tried setting Unattended-Upgrade::Automatic-Reboot-Time just to see whether it reboots? – stratus Dec 9 '19 at 17:50
  • I've posted 20auto-upgrades file contents in the question. Also, trying Unattended-Upgrade::Automatic-Reboot-Time "+0"; or Unattended-Upgrade::Automatic-Reboot-Time "now"; doesn't make much difference. Running sudo apt-get upgrade doesn't lead to a restart when it should. Perhaps there is a service that needs to reload the contents of the two conf files? – MartinH Dec 11 '19 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.