summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-blockdevices-filesystems.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-12 19:09:49 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-12 19:09:49 +0100
commit88d3aa1e000b4a5a4d5d9268325ea33bde9106b8 (patch)
tree7e15afaf7410c18c72914f81445d44343ed33e28 /src/core/libs/lib-blockdevices-filesystems.sh
parent9b6a60ce7f552eb4a208f0edb5b8fcee546804df (diff)
warn on device busy
Diffstat (limited to 'src/core/libs/lib-blockdevices-filesystems.sh')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index c76264a..b2e829f 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -390,8 +390,12 @@ process_filesystems ()
swapoff $part &>/dev/null # could be that it was not swappedon yet. that's not a problem at all.
elif [ "$fs_mountpoint" != no_mount ]
then
- infofy "(Maybe) Umounting $part" disks
- umount ${part/+/} &>/dev/null # could be that this was not mounted yet. no problem. NOTE: umount part, not mountpoint. some other part could be mounted in this place, we don't want to affect that.
+ part_real=${part/+/}
+ infofy "(Maybe) Umounting $part_real" disks
+ if mount | grep -q "^$part_real " # could be that this was not mounted yet. no problem, we can just skip it then. NOTE: umount part, not mountpoint. some other part could be mounted in this place, we don't want to affect that.
+ then
+ umount $part_real >$LOG || show_warning "Umount failure" "Could not umount umount $part_real . Probably device is still busy. See $LOG" #TODO: fix device busy things
+ fi
fi
done