diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-10 09:48:31 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-10 09:48:31 +0000 |
commit | 8df87f1b6dc94fa6dc8e035f56e72b847545e0b7 (patch) | |
tree | b8c86ae26d610435bca813c3a773f59af2419d8a /package/block-mount | |
parent | ed2a905399c6f61593e79b06d1c9440ea7014d85 (diff) | |
download | upstream-8df87f1b6dc94fa6dc8e035f56e72b847545e0b7.tar.gz upstream-8df87f1b6dc94fa6dc8e035f56e72b847545e0b7.tar.bz2 upstream-8df87f1b6dc94fa6dc8e035f56e72b847545e0b7.zip |
[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')
-rw-r--r-- | package/block-mount/Makefile | 2 | ||||
-rw-r--r-- | package/block-mount/files/40-mount | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/package/block-mount/Makefile b/package/block-mount/Makefile index b82011fe42..799539e4bd 100644 --- a/package/block-mount/Makefile +++ b/package/block-mount/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=block-mount PKG_VERSION:=0.2.0 -PKG_RELEASE:=8 +PKG_RELEASE:=9 include $(INCLUDE_DIR)/package.mk diff --git a/package/block-mount/files/40-mount b/package/block-mount/files/40-mount index 5118d9c104..f1d63eba66 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 |