summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-12 22:44:37 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-12 22:44:37 +0100
commit570beb338a1462854522c3d0dd6070986fbd35a0 (patch)
tree831658919512572c6f0babbcb63752ff176c566c /src/core
parentd10c38678434e2cebb3d112687ee1d167d4e53c3 (diff)
better patch for mount/umount order
Diffstat (limited to 'src/core')
-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"