summaryrefslogtreecommitdiff
path: root/package/block-mount/files/40-mount
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-06-21 16:53:00 +0000
committerJohn Crispin <john@openwrt.org>2013-06-21 16:53:00 +0000
commitd55316af38d76fc62d5354b9f444d474406f801d (patch)
tree623c2aad5722a3bf7941cdca13f48cf768d595d3 /package/block-mount/files/40-mount
parent08de6fcc12b413620cab4375d9a27b06e9c3ff93 (diff)
downloadmtk-20170518-d55316af38d76fc62d5354b9f444d474406f801d.zip
mtk-20170518-d55316af38d76fc62d5354b9f444d474406f801d.tar.gz
mtk-20170518-d55316af38d76fc62d5354b9f444d474406f801d.tar.bz2
block-mount: drop package, ubox now does the job for us
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36988
Diffstat (limited to 'package/block-mount/files/40-mount')
-rw-r--r--package/block-mount/files/40-mount91
1 files changed, 0 insertions, 91 deletions
diff --git a/package/block-mount/files/40-mount b/package/block-mount/files/40-mount
deleted file mode 100644
index f1d63eb..0000000
--- a/package/block-mount/files/40-mount
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-# 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.
-#
-
-. /lib/functions/block.sh
-
-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)
-
- local from_fstab
- local anon_mount
- local anon_swap
- local anon_fsck
- local mds_mount_target
- local mds_mount_device
- local mds_mount_fstype
- local sds_swap_device
- local use_device
- local do_fsck=0
- local fsck_type
-
- local autoswap_from_fstab
- local automount_from_fstab
-
- mount_dev_section_cb() {
- mds_mount_target="$2"
- mds_mount_device="$3"
- mds_mount_fstype="$4"
- mds_mount_enabled="$6"
- }
-
- swap_dev_section_cb() {
- sds_swap_device="$2"
- return 0
- }
-
- config_get_automount
- automount_from_fstab="$from_fstab"
- [ "$automount_from_fstab" -eq 1 ] && {
- config_get_mount_section_by_device "/dev/$device"
- use_device="$mds_mount_device"
- [ "$mds_mount_enabled" -eq 1 ] && {
- if [ -n "$mds_mount_target" ]; then
- grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
- ( mkdir -p "$mds_mount_target" && mount "$mds_mount_target" ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
- }
- else
- logger -t 'fstab' "Mount enabled for $mds_mount_device but it doesn't have a defined mountpoint (target)"
- fi
- }
- }
-
- [ -z "$use_device" ] && {
- config_get_autoswap
- autoswap_from_fstab="$from_fstab"
-
- [ "$autoswap_from_fstab" -eq 1 ] && {
- config_get_swap_section_by_device "/dev/$device"
- use_device="$sds_swap_device"
- }
- }
-
- grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
- [ "$anon_mount" -eq 1 -a -z "$use_device" ] && {
- case "$device" in
- mtdblock*) ;;
- *)
- ( mkdir -p /mnt/$device && mount /dev/$device /mnt/$device ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
- ;;
- esac
- }
- }
- reset_dev_section_cb
- ;;
- remove)
- umount /dev/$device
- umount $mountpoint
- ;;
- esac
-
-fi
-