install

installer
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/install

commit f7440766bb44c4fa1670e2899a94e5d0037b6240
parent 7a3e939907b8b086e4276099923998c8828f71e4
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 11 Jan 2017 08:12:46 +0100

Add(Final clean): Add final_clean function

Diffstat:
Mscreens/install/install.py | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/screens/install/install.py b/screens/install/install.py @@ -64,6 +64,7 @@ class Install: def init(self, dialog, config_list): self.dlg = dialog self.conf_lst = config_list + self.real_root = os.open("/", os.O_RDONLY) self.config = { "id": 6, "name": "Install" @@ -140,6 +141,7 @@ class Install: self.install_bootscripts() self.fstab() self.grub() + self.final_clean() self.dlg.msgbox("The installation is finished. Hit 'Enter' to close this dialog and reboot.", title="Success !") # Need reboot here @@ -981,3 +983,16 @@ class Install: fd.write(" linux /boot/vmlinuz-4.7.2-morphux root="+ root["part"] +" ro net.ifnames=0\n") fd.write("}") fd.close() + + # This function clean the entire system + def final_clean(self): + self.dlg.infobox("Cleaning system...") + self.e(["rm", "-rf", "/packages"]) + + # Exiting chroot + os.fchdir(self.real_root) + os.chroot(".") + self.mnt_point = "/mnt/morphux" + + # Umount every partition + self.e(["umount", "-R", self.mnt_point])