File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ mount -t proc proc /proc || exit 1
1111grep -q ' root=.*nfs\|mmcblk\|ram' /proc/cmdline && exit 0
1212grep -q overlay /proc/filesystems || exit 1
1313
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)
1516if [ -n " $configfs_dev " ]; then
16- mount -t jffs2 " $configfs_dev " /config
17+ mount -t jffs2 " $configfs_blk " /config
1718 if ! grep -q " /config " /proc/mounts; then
1819 echo " Init: Invalid config partition detected. Formatting..."
19- flash_eraseall -j " $configfs_dev "
20- mount -t jffs2 " $configfs_dev " /config
20+ flash_eraseall -j /dev/ $configfs_dev
21+ mount -t jffs2 " $configfs_blk " /config
2122 grep -q " /config " /proc/mounts || \
2223 echo " Init: ERROR: Failed to mount config partition after format!"
2324 fi
You can’t perform that action at this time.
0 commit comments