Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-14 12:13:08 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-14 12:13:08 +0100
commit577428f1b20da6f7f583c9c3c276ee1d38abb01d (patch)
tree1fda7e0df12edd9e6f54bff057bb62ad7920c435 /archinstall/lib/disk.py
parent5483b218fd62fcea8648525eb8aa6b7af4cc200b (diff)
Added a partition.umount() and a check when running cryptsetup if the disk is in use.
Diffstat (limited to 'archinstall/lib/disk.py')
-rw-r--r--archinstall/lib/disk.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index c05ba757..16756df8 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -312,6 +312,11 @@ class Partition():
self.mountpoint = target
return True
+ def unmount(self):
+ if sys_command(f'/usr/bin/umount {self.path}').exit_code == 0:
+ self.mountpoint = None
+ return True
+
def filesystem_supported(self):
"""
The support for a filesystem (this partition) is tested by calling