From 577428f1b20da6f7f583c9c3c276ee1d38abb01d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 14 Mar 2021 12:13:08 +0100 Subject: Added a partition.umount() and a check when running cryptsetup if the disk is in use. --- archinstall/lib/disk.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archinstall/lib/disk.py') 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 -- cgit v1.2.3-70-g09d2