Update overlay unmount code

This commit is contained in:
Rudra Saraswat 2023-05-08 22:28:09 +05:30
parent d016275a71
commit 6ef4c3e197

12
akshara
View file

@ -213,12 +213,12 @@ def install_system_package():
exit(1) exit(1)
exec('mkdir', '-p', '/.blendrw') exec('mkdir', '-p', '/.blendrw')
if exec('findmnt', '/.blendrw/usr') != 0: while exec('umount', '-l', '/.blendrw/usr', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) != 0:
exec('umount', '-l', '/.blendrw/usr', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) pass
if exec('findmnt', '/.blendrw/var/lib/pacman') != 0: while exec('umount', '-l', '/.blendrw/var/lib/pacman', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) != 0:
exec('umount', '-l', '/.blendrw/var/lib/pacman', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) pass
if exec('findmnt', '/.blendrw') != 0: while exec('umount', '-l', '/.blendrw', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) != 0:
exec('umount', '-l', '/.blendrw', stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) pass
for old_overlay in os.listdir('/mnt'): for old_overlay in os.listdir('/mnt'):
if old_overlay.startswith('.blend-tmp-overlay-'): if old_overlay.startswith('.blend-tmp-overlay-'):
exec('rm', '-rf', f'/mnt/{old_overlay}') exec('rm', '-rf', f'/mnt/{old_overlay}')