From 88d3aa1e000b4a5a4d5d9268325ea33bde9106b8 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 12 Dec 2008 19:09:49 +0100 Subject: warn on device busy --- src/core/libs/lib-blockdevices-filesystems.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-54-g00ecf