diff options
author | John Crispin <blogic@openwrt.org> | 2013-06-21 16:53:00 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-06-21 16:53:00 +0000 |
commit | 7664baab52d985ba17446b6ff8d11f473e232d30 (patch) | |
tree | e7bd0f969d9e65e8197087b9e238588c46a92ecd /package/block-mount/files/mount.sh | |
parent | 11b33f6d64c3b6e63dd71a7b722999b1c346d410 (diff) | |
download | upstream-7664baab52d985ba17446b6ff8d11f473e232d30.tar.gz upstream-7664baab52d985ba17446b6ff8d11f473e232d30.tar.bz2 upstream-7664baab52d985ba17446b6ff8d11f473e232d30.zip |
block-mount: drop package, ubox now does the job for us
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36988 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/block-mount/files/mount.sh')
-rw-r--r-- | package/block-mount/files/mount.sh | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/package/block-mount/files/mount.sh b/package/block-mount/files/mount.sh deleted file mode 100644 index e96174ce92..0000000000 --- a/package/block-mount/files/mount.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# Copyright 2010 Vertical Communications -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - - -pi_include /lib/functions/block.sh -pi_include /lib/functions/fsck.sh - -config_mount_by_section() { - local cfg="$1" - local find_rootfs="$2" - - mount_cb() { - local cfg="$1" - local device="$2" - shift - local target="$2" - local cfgdevice="$3" - local fstype="$4" - local options="$5" - local enabled="$6" - local enabled_fsck="$7" - local uuid="$8" - local label="$9" - shift - local is_rootfs="$9" - shift - local found_device="" - - found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")" - if [ -n "$found_device" ]; then - if [ "$find_rootfs" != "1" ] || ( [ "$is_rootfs" -eq 1 ] || [ "$target" = "/" ] || [ "$target" = "/overlay" ] ); then - [ "$enabled_fsck" -eq 1 ] && { - grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || { - libmount_fsck "$found_device" "$fstype" "$enabled_fsck" - } - } - - if [ "$find_rootfs" = "1" ]; then - if [ "$is_rootfs" -eq 1 ]; then - target=/overlay - elif [ "$target" = "/" ]; then - target=/rom - fi - else - if [ "$is_rootfs" -eq 1 ] || [ "$target" = "/overlay" ]; then - target=/tmp/overlay-disabled - elif [ "$target" = "/" ] || [ "$target" = "/rom" ]; then - target="/tmp/whole_root-disabled" - fi - fi - - config_create_mount_fstab_entry "$found_device" "$target" "$fstype" "$options" "$enabled" - grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || { - [ "$enabled" -eq 1 ] && mkdir -p "$target" && mount "$target" 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab' - } - - fi - fi - [ "$find_rootfs" = "1" ] && { - [ "$target" = "/overlay" ] && { - rootfs_found=1 - } - [ "$target" = "/rom" ] && { - rootfs_found=1 - } - } - return 0 - } - config_get_mount "$cfg" - reset_block_cb -} - -config_swapon_by_section() { - local cfg="$1" - - swap_cb() { - local cfg="$1" - local device="$2" - local cfgdevice="$3" - local enabled="$4" - local uuid="$5" - local label="$6" - local uuid - local label - - local found_device="" - - found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")" - - if [ -n "$found_device" ]; then - config_create_swap_fstab_entry "$found_device" "$enabled" - grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || { - [ "$enabled" -eq 1 ] && swapon "$found_device" | tee /proc/self/fd/2 | logger -t 'fstab' - } - fi - return 0 - } - config_get_swap "$cfg" - reset_block_cb -} |