Browse code

Removing the installer files from the system

Mahmoud Bassiouny authored on 2015/07/24 03:32:21
Showing 1 changed files
... ...
@@ -272,6 +272,9 @@ class Installer(object):
272 272
         if self.iso_installer:
273 273
             # just copy the initramfs /boot -> /photon_mnt/boot
274 274
             shutil.copy('boot/initrd.img-no-kmods', self.photon_root + '/boot/')
275
+            # remove the installer directory
276
+            process = subprocess.Popen(['rm', '-rf', os.path.join(self.photon_root, "installer")], stdout=self.output)
277
+            retval = process.wait()
275 278
         else:
276 279
             #Build the initramfs
277 280
             process = subprocess.Popen([self.chroot_command, '-w', self.photon_root, './mkinitramfs', '-n', 'boot/initrd.img-no-kmods'],  stdout=self.output)