diff options
author | Robert Marko <robimarko@gmail.com> | 2020-12-20 18:02:54 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-12-20 17:14:56 +0000 |
commit | 7a181a65f2e5d19e379cebbb980aa2f2985709e2 (patch) | |
tree | c88628d4a8c24e6fab86c6728085ec7f7574863f /target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh | |
parent | 0cf3c5dd7257dff1c87b61c5e53e5b1787ab7015 (diff) | |
download | upstream-7a181a65f2e5d19e379cebbb980aa2f2985709e2.tar.gz upstream-7a181a65f2e5d19e379cebbb980aa2f2985709e2.tar.bz2 upstream-7a181a65f2e5d19e379cebbb980aa2f2985709e2.zip |
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 <robimarko@gmail.com>
Diffstat (limited to 'target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh')
-rw-r--r-- | target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh index 5ee5492369..97d388168f 100644 --- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh @@ -39,7 +39,7 @@ platform_do_upgrade() { ;; *) # NOR devices: erase firmware if booted from initramfs - [ -z "$(rootfs_type)" ] && mtd erase firmware + [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware default_do_upgrade "$1" ;; |