diff options
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 2ed353b2a5..b3a3885f2d 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -220,6 +220,15 @@ include() { done } +find_mtd_part() { + local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')" + local PREFIX=/dev/mtdblock + + PART="${PART##mtd}" + [ -d /dev/mtdblock ] && PREFIX=/dev/mtdblock/ + echo "${PART:+$PREFIX$PART}" +} + strtok() { # <string> { <variable> [<separator>] ... } local tmp local val="$1" |