[gnome-boxes] vm-creator: Don't ignore force shutdown
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-creator: Don't ignore force shutdown
- Date: Mon, 4 Nov 2013 15:30:19 +0000 (UTC)
commit 13a45cca8ce7e6f4c96300a1bcf9f0450cc433f2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Nov 3 16:55:20 2013 +0000
vm-creator: Don't ignore force shutdown
Instead of completing ignoring force shutdown and not checking for
installations at all, just don't automatically delete live VMs on force
shutdown when no installation is performed by last live session.
Some OSes (e.g Ubuntu) require you to eject the CDROM before rebooting
after installation. Since we don't allow that during installation/live
session (see commit 4bed1f5 or bug#690779 for details on why), only
option user has is to work around this by force shutting down the VM and
that won't actually work w/o this change as VM will continue to be
marked as 'live'.
https://bugzilla.gnome.org/show_bug.cgi?id=707803
src/vm-creator.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index a657b60..5347d62 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -135,9 +135,6 @@ private class Boxes.VMCreator {
return;
}
- if (machine.state == Machine.MachineState.FORCE_STOPPED)
- return;
-
if (machine.state == Machine.MachineState.SAVED) {
// This means the domain was just saved and thefore this is not yet the time to take any
post-install
// steps for this domain.
@@ -161,7 +158,8 @@ private class Boxes.VMCreator {
machine.info = null;
machine.vm_creator = null;
} else {
- if (VMConfigurator.is_live_config (machine.domain_config)) {
+ if (VMConfigurator.is_live_config (machine.domain_config) &&
+ machine.state != Machine.MachineState.FORCE_STOPPED) {
// No installation during live session, so lets delete the VM
machine.disconnect (state_changed_id);
install_media.clean_up ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]