How to shutdown with automatic updates in progress?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
minty_mint
Level 1
Level 1
Posts: 1
Joined: Mon Jan 17, 2022 3:40 am

How to shutdown with automatic updates in progress?

Post by minty_mint »

Hi everyone,

I enabled all the automation update and maintenance options inside update manager and in general, it's working like a charm. This is an outstanding feature that no other distro really seems to offer, I totally love it!

However, sometimes the running installation process will prevent the system from shutting down, meaning the GUI will only offer suspend mode. There is also no progress visible to the user apart from the update icon, which in this case tells me that another installation if already running if I press "install updates".

I understand that there are some crucial tasks that cannot be interrupted, but it looks like the lock persists until all the packages are upgraded, not just the essential ones. So the only option I see is to manually wait and check periodically if the shutdown is available again, which can take a long time and seems very inefficent for a modern OS.

Is there any better possibility to this? An automatic, queued shutdown option after the updater finished would be perfect. I would also be thankful for the possibility to cancel the installation process at the next non-critical package.

Regards!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: How to shutdown with automatic updates in progress?

Post by DJ55 »

Welcome to the forum. There's probably a script that could do this (there's an old example at https://kotbcorp.blogspot.com/2009/06/s ... buntu.html that might still work but would need to be tested) but the easiest way would be to simply enter a command to schedule a shutdown to occur in an hour or two. Here's an example that's set to 60 minutes:

Code: Select all

shutdown -h +60
You can pick whatever set of minutes you think is appropriate. And, once you find the time period you like, you could make this command into a desktop launcher if you're going to use it a lot.
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
Locked

Return to “Software & Applications”