summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index d6b8b03..aa7dd6f 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -389,12 +389,18 @@ fix_filesystems ()
{
[ -z "$1" -o ! -f "$1" ] && die_error "Fix_filesystems needs a file with the setup structure in it"
- for line in $(tac $1); do #TODO: we should probably do / as last because we can't umount it if other filesystems are mounted in it. for now we can be sure we do swap last and before that /.
+ # Umount all things first, umount / last. After that create/mount stuff again, with / first
+ # TODO: we now rely on the fact that the manual mountpoint selecter uses this order 'swap,/, /<*>'. It works for now but it's not the most solid
+
+ for line in $(tac $1); do
+ MP=$(echo $line | cut -d: -f 3)
+ umount ${var_TARGET_DIR}${MP}
+ done
+ for line in $(cat $1); do
PART=$(echo $line | cut -d: -f 1)
FSTYPE=$(echo $line | cut -d: -f 2)
MP=$(echo $line | cut -d: -f 3)
DOMKFS=$(echo $line | cut -d: -f 4)
- umount ${var_TARGET_DIR}${MP}
if [ "$DOMKFS" = "yes" ]; then
if [ "$FSTYPE" = "swap" ]; then
infofy "Creating and activating swapspace on $PART"