aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/partition.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/partition.sh b/include/partition.sh
index 7e9fbed..fda2734 100755
--- a/include/partition.sh
+++ b/include/partition.sh
@@ -19,9 +19,14 @@
set -ue
. /lib/fripost-partman/base.sh
+device=/dev/sda
+
+# Umount existing mountpoints
+for mp in $(sed -nr "s#^$device\S*\s+(\S+).*#\1#p" /proc/mounts); do
+ umount "$mp"
+done
# Wipe the disk
-device=/dev/sda
fripost_wipe $device
db_get fripost/encrypt