File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ mount -t proc proc /proc || exit 1
11
11
grep -q ' root=.*nfs\|mmcblk\|ram' /proc/cmdline && exit 0
12
12
grep -q overlay /proc/filesystems || exit 1
13
13
14
- configfs_dev=$( awk ' $4 ~ /"config"/ {gsub(":","",$1); print "/dev/mtdblock" substr($1,4)}' /proc/mtd)
14
+ configfs_dev=$( awk -F ' :' ' /config/ {print $1}' /proc/mtd)
15
+ configfs_blk=$( awk ' $4 ~ /"config"/ {gsub(":","",$1); print "/dev/mtdblock" substr($1,4)}' /proc/mtd)
15
16
if [ -n " $configfs_dev " ]; then
16
- mount -t jffs2 " $configfs_dev " /config
17
+ mount -t jffs2 " $configfs_block " /config
17
18
if ! grep -q " /config " /proc/mounts; then
18
19
echo " Init: Invalid config partition detected. Formatting..."
19
20
flash_eraseall -j " $configfs_dev "
20
- mount -t jffs2 " $configfs_dev " /config
21
+ mount -t jffs2 " $configfs_blk " /config
21
22
grep -q " /config " /proc/mounts || \
22
23
echo " Init: ERROR: Failed to mount config partition after format!"
23
24
fi
You can’t perform that action at this time.
0 commit comments