base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 8 Apr 2014 21:17:49 +0000 (21:17 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 8 Apr 2014 21:17:49 +0000 (21:17 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40426

package/base-files/files/lib/functions.sh
package/base-files/files/lib/functions/system.sh

index 1b34b8f50dcb12782e0f63105e814f1b72d50503..e55cad0b200275cdbbe4d08bad13fad24d45c6a4 100755 (executable)
@@ -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
index 76554601595c7cd3a251fe4c387857d68500e800..a4c0f2620c5e9179b5033a4c5a4ecf8d34d31a5c 100644 (file)
@@ -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