mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-22 04:18:10 +00:00
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>
Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
74e4377a48
commit
fd5cb530ab
@ -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"
|
||||
;;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user