Ask Your Question

dnf-automatic / enable install, disable restart

asked 2019-03-30 06:16:12 -0600

larslindstrom gravatar image

Hi everyone!

I am trying to figure out how to properly configure automatic updates on Fedora 29 so that updates will be downloaded and installed, but the machine not getting restarted.

Within Cockpit, I only have the option between automatic updates being disabled or enabled "... and restart the machine automatically." The configuration file for dnf-automatic also provides either "download only" or "install as well", which seems to again cause a restart.

To be honest, I could not figure out wheter it is dnf-automatic restarting the machine or the installation of some package (for instance the kernel) which is causing the restart, but this is a major issue, as the server is full disk encrypted an cannot restart without user intervention (as the passphrase has to be entered).

Any idea on how to download and apply updates but _not_ restart the machine (I am aware that this will not activate updates the required a reboot)?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-30 14:35:47 -0600

updated 2019-03-30 14:37:08 -0600

Thats easy: ( update every 2 hours )

echo "* */2 * * * root dnf -y update >> /var/log/messages" > /etc/cron.d/autoupdate

If you use NVIDIA Drivers and your system gets a new kernel, while your using it, you may end with a missing nvidia.ko module. It got build, but it's simply not found anymore. In case 3d software does not start, just reboot.

edit flag offensive delete link more


Thanks for the scriptlet!

I've been skimming through the dnf-automatic code and I see no signs for the automatic restart, so I assume that something during the package installation is causing the restart - so this scriptlet will most likely also cause the server to restart.

larslindstrom gravatar imagelarslindstrom ( 2019-04-01 13:31:09 -0600 )edit

No, your server will not restart. It will restart services, but thats it and it's necessary.

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-01 15:58:02 -0600 )edit

Question Tools


Asked: 2019-03-30 06:16:12 -0600

Seen: 199 times

Last updated: Apr 01 '19