projects
/
openwrt
/
staging
/
ynezz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
484609e
)
make find_mtd_part work without devfs
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 2 Mar 2007 19:01:49 +0000
(19:01 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 2 Mar 2007 19:01:49 +0000
(19:01 +0000)
SVN-Revision: 6466
package/base-files/files/etc/functions.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/functions.sh
b/package/base-files/files/etc/functions.sh
index 1cb365d478d6ffcececf9568f3c58cc84abc54f8..c29ae772ac3b5bc02e12c5e6817250e5c3aed845 100755
(executable)
--- a/
package/base-files/files/etc/functions.sh
+++ b/
package/base-files/files/etc/functions.sh
@@
-151,9
+151,11
@@
include() {
find_mtd_part() {
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
+ local PREFIX=/dev/mtdblock
PART="${PART##mtd}"
- echo "${PART:+/dev/mtdblock/$PART}"
+ [ -d /dev/mtdblock ] && PREFIX=/dev/mtdblock/
+ echo "${PART:+$PREFIX$PART}"
}
strtok() { # <string> { <variable> [<separator>] ... }