system: expose if system was booted from initramfs
authorDaniel Golle <daniel@makrotopia.org>
Mon, 15 Feb 2021 07:06:42 +0000 (07:06 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 23 Feb 2021 00:42:37 +0000 (00:42 +0000)
commit37eed131e9967a35f47bacb3437a9d3c8a57b3f4
tree7497116b9f5244e80021273d1ae6cd38aed430c1
parent2be57ed3fbee3ca61edf4e36e01a7ebece11fb28
system: expose if system was booted from initramfs

It can be good for UI to show to the user that the system was booted
from initramfs ie. no writable permanent storage is available.
I imagine LuCI only serving applications which are explicitely marked
as being shown even in initramfs mode, ie. nothing but status,
network->interfaces, network->wireless, system->upgrade,
system->backup, system->backuprestore tabs.
Also sysupgrade could take into account we are running on initramfs
and perform offline backup/restore of whatever is in the flash.
In that way OpenWrt-generated initramfs-images can serve as recovery
OS on devices with dual-boot in a meaningful way.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
initd/preinit.c
system.c