TransWikia.com

Unattended-Upgrade::Automatic-Reboot default value

Ask Ubuntu Asked by Stringer on November 21, 2021

In my /etc/apt/apt.conf.d/50unattended-upgrades i found this:

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

The issue is that I don’t know what the default value is and so if I need to uncomment the line (I don’t want my server to reboot btw).

Should I uncomment the line by safety? Are there further actions to perform after doing that?

3 Answers

In my case I found that I had

Unattended-Upgrade::Automatic-Reboot "true"

in

/etc/apt/apt.conf.d/99custom-unattended-upgrades

I found it based on the hint by @Mark Stosberg, by running grep Reboot /etc/apt/apt.conf.d/*

See here for more details.

Answered by Zoltán on November 21, 2021

The default for automatically rebooting after unattended-upgrades is FALSE.

You can confirm on your own system by looking where the default value is stored, in the script itself:

grep 'Automatic-Reboot"' /usr/bin/unattended-upgrade

The default could change with a software upgrade, although that seems unlikely. To be certain your systems don't reboot by after automatic upgrades, explicitly disable rebooting in your configuration.

Answered by Mark Stosberg on November 21, 2021

If you don't want it to auto-reboot, make that section look like this:

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

I have it set that way and it works.

This page says that not rebooting is the default, but I'm pretty sure that's wrong. I think the first time my system autoinstalled a kernel (before I changed the config), it rebooted. But in either case, the config above will prevent it.

Answered by Organic Marble on November 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP