[gnome-boxes] installer-media: Allow keeping the media after installation



commit f4d14a7669c03ff34af383824044b2246230fc56
Author: Fabiano FidĂȘncio <fabiano fidencio org>
Date:   Mon Apr 10 23:05:27 2017 +0200

    installer-media: Allow keeping the media after installation
    
    Some OSes may actually keep the installer media after the installation's
    first reboot, as they still need to install some packages after this
    step (that's the SLES case).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781600
    
    Signed-off-by: Fabiano FidĂȘncio <fabiano fidencio org>

 src/installer-media.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index b31de44..43a2912 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -39,6 +39,7 @@ private class Boxes.InstallerMedia : GLib.Object {
     }
 
     public virtual bool live { get { return os_media == null || os_media.live; } }
+    public virtual bool eject_after_install { get { return os_media == null || os_media.eject_after_install; 
} }
 
     protected virtual string? architecture {
         owned get {
@@ -265,7 +266,7 @@ private class Boxes.InstallerMedia : GLib.Object {
             if (disk_type == DomainDiskGuestDeviceType.CDROM) {
                 // Make source (installer/live media) optional
                 disk.set_startup_policy (DomainDiskStartupPolicy.OPTIONAL);
-                if (!live) {
+                if (eject_after_install && !live) {
                     // eject CDROM contain in the CD drive as it will not be useful after installation
                     disk.set_source ("");
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]