[virt-manager PATCH 5/7] installer: deal with unattended files

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

 



Let's have a way to keep track of unattended files that are going to be
used when performing a unattended installation of a Windows guest so we
can clean them up whenever the installation is done.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/installer.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtinst/installer.py b/virtinst/installer.py
index 488ed324..0d60bb02 100644
--- a/virtinst/installer.py
+++ b/virtinst/installer.py
@@ -50,6 +50,7 @@ class Installer(object):
         self._install_initrd = None
         self._install_cdrom_device = None
         self._install_floppy_device = None
+        self._unattended_files = []
         self._defaults_are_set = False
 
         if location_kernel or location_initrd:
@@ -131,6 +132,10 @@ class Installer(object):
         self._install_floppy_device.path = None
         self._install_floppy_device.sync_path_props()
 
+    def _cleanup_unattended_files(self):
+        for f in self._unattended_files:
+            os.unlink(f)
+
     def _build_boot_order(self, guest, bootdev):
         bootorder = [bootdev]
 
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux