From 7a181a65f2e5d19e379cebbb980aa2f2985709e2 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 20 Dec 2020 18:02:54 +0100 Subject: treewide: fix initramfs detection Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to now use tmpfs, it causes $(rootfs_type) to now return tmpfs when running initramfs image instead of being empty. This broke initramfs detection which is required so that when installing on MikroTik devices firmware partition would first get erased fully before writing. So, lets test for $(rootfs_type) returning "tmpfs" instead. Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail) Signed-off-by: Robert Marko --- target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ramips/mt7621') diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index c68b012d0b..99ed36e429 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -31,7 +31,7 @@ platform_do_upgrade() { mikrotik,routerboard-760igs|\ mikrotik,routerboard-m11g|\ mikrotik,routerboard-m33g) - [ -z "$(rootfs_type)" ] && mtd erase firmware + [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware ;; asus,rt-ac65p|\ asus,rt-ac85p) -- cgit v1.2.3