Merge branch 'master' of code.vuplus.com:/opt/repository/openvuplus_3.0
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-core / udev / udev-182 / autoumount.sh
1 #!/bin/sh
2
3 get_mount_point() {
4         mount |grep /dev/$1 |cut -d ' ' -f3
5 }
6
7 DEVICE=$1
8
9 if test -z $DEVICE; then
10         exit 1
11 fi
12
13 MOUNTPOINT="$(get_mount_point $DEVICE)"
14
15 if test -n "${MOUNTPOINT}"; then
16         echo "[udev] umount -l ${MOUNTPOINT}"
17         umount -l ${MOUNTPOINT}
18 fi
19