aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-01-03 01:41:05 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 04:27:51 +0200
commit34b5dc134ed6ba8dc6f922915c894fb0a176f0b5 (patch)
tree8986a5b6298ddb58fc9cb77c40bc8e1cb691bf25 /include
parent384b20bcba9f733e0d7b086f2326f38fdb9fc56d (diff)
bugfix
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