mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			[no ci] Overlay: update init (#1546)
							parent
							
								
									e270b5b1bf
								
							
						
					
					
						commit
						85e10502ef
					
				|  | @ -17,6 +17,7 @@ if ! grep -q 'root=.*nfs\|mmcblk\|ram' /proc/cmdline; then | ||||||
| 		mtdblkdev=$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd | sed 's/mtd/mtdblock/') | 		mtdblkdev=$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd | sed 's/mtd/mtdblock/') | ||||||
| 		mtdchrdev=$(grep 'rootfs_data' /proc/mtd | cut -d: -f1) | 		mtdchrdev=$(grep 'rootfs_data' /proc/mtd | cut -d: -f1) | ||||||
| 		if ! mount -t jffs2 /dev/$mtdblkdev /overlay || dmesg | grep -q "jffs2.*: Magic bitmask.*not found"; then | 		if ! mount -t jffs2 /dev/$mtdblkdev /overlay || dmesg | grep -q "jffs2.*: Magic bitmask.*not found"; then | ||||||
|  | 			mountpoint -q /overlay && umount /overlay | ||||||
| 			echo "Formatting flash..." | 			echo "Formatting flash..." | ||||||
| 			grep -q 'nand' /proc/cmdline || jffs2="-j" | 			grep -q 'nand' /proc/cmdline || jffs2="-j" | ||||||
| 			flash_eraseall $jffs2 /dev/$mtdchrdev | 			flash_eraseall $jffs2 /dev/$mtdchrdev | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue