1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 05:34:36 +02:00

[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
This commit is contained in:
jow 2012-09-10 09:48:31 +00:00
parent 405e94ce42
commit 1fc290f2e3
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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