We shouldn't allow to shutdown the system when a installation or a update is in progress

Bug #1404961 reported by Raphael Isemann
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
elementary OS
Confirmed
Undecided
Unassigned
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

The system shouldn't allow to abort things such as:

* apt-get upgrade
* update manager installing updates
* software center installation

as that could result in a inconsistent system that needs manual intervention to fix in most cases (e.g. apt-get install -f).

It seems that checking if dpkg is locked is a good way to determine if it is safe to shutdown (if i understood that correctly from shnatsels explanation).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Anderson Lorencini (lorencini-brdev) wrote :

That really is a problem. How should we handle it? By showing the user a message, and giving him the option to shutdown anyways? By installing the updates and only then shutdown, windows style? Or by forbidding the shutdown completely? Personally, i think the second option is the best. Because, that way, i can order it to shutdown, and just leave it there, knowing that when i get back home, for example, it will be off.

Revision history for this message
notreallyhere (notreallyhere-deactivatedaccount) wrote :

In my opinion the best option is to tell the user about on going update/whatever and inform system will be halted when done.

Changed in elementaryos:
status: New → Confirmed
Revision history for this message
Cameron Norman (cameronnemo) wrote :

So getting a systemd-inhibit (works on all logind systems) delay lock on the shutdown action seems to be a good way to do this, no?

Revision history for this message
Cameron Norman (cameronnemo) wrote :
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

This is already implemented for unattended-upgrades, i.e. when security updates are installed automatically in the background. It should be fairly trivial to adapt that check to handle user-initiated upgrades as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.