From: Felix Fietkau Date: Tue, 8 Apr 2014 21:17:49 +0000 (+0000) Subject: base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes... X-Git-Tag: reboot~7498 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dd58e15b84c0437ea4b06af4df3cc43b53b67228;p=oweals%2Fopenwrt.git base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes #15496) Signed-off-by: Felix Fietkau SVN-Revision: 40426 --- diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 1b34b8f50d..e55cad0b20 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -168,6 +168,13 @@ include() { done } +find_mtd_index() { + local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')" + local INDEX="${PART##mtd}" + + echo ${INDEX} +} + find_mtd_part() { local INDEX=$(find_mtd_index "$1") local PREFIX=/dev/mtdblock diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 7655460159..a4c0f2620c 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -1,12 +1,5 @@ # Copyright (C) 2006-2013 OpenWrt.org -find_mtd_index() { - local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')" - local INDEX="${PART##mtd}" - - echo ${INDEX} -} - find_mtd_chardev() { local INDEX=$(find_mtd_index "$1") local PREFIX=/dev/mtd