diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-09-10 09:48:31 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-09-10 09:48:31 +0000 |
commit | 1fc290f2e3fe2529f5f48b6a070516ed4edd3ea4 (patch) | |
tree | b8c86ae26d610435bca813c3a773f59af2419d8a /package/block-mount/files | |
parent | 405e94ce4242a77d650e1776b7c205e7cece3cf8 (diff) |
[package] block-mount: additionally try to umount disk by mountpoint (#12056)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33357 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/block-mount/files')
-rw-r--r-- | package/block-mount/files/40-mount | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/package/block-mount/files/40-mount b/package/block-mount/files/40-mount index 5118d9c10..f1d63eba6 100644 --- a/package/block-mount/files/40-mount +++ b/package/block-mount/files/40-mount @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2009-2010 OpenWrt.org +# Copyright (C) 2009-2012 OpenWrt.org # Copyright (C) 2010 Vertical Communications # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,6 +11,7 @@ blkdev=`dirname $DEVPATH` if [ `basename $blkdev` != "block" ]; then device=`basename $DEVPATH` + mountpoint=`sed -ne "s|^[^ ]*/$device ||; T; s/ .*//p" /proc/self/mounts` case "$ACTION" in add) @@ -82,6 +83,7 @@ if [ `basename $blkdev` != "block" ]; then ;; remove) umount /dev/$device + umount $mountpoint ;; esac |