The firstboot rpc call might not return, therefor do not wait on promise
fullfillment but display modal dialog right away.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Instead of binding the checked state to the button handler function,
bind the underlying checkboxes instead to observe the actual user
choice instead of the initial value.
This fixes forcing sysupgrade or deselecting keep settings.
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
The `/sys/devices/virtual/mtd/` information is not available on all
devices so rely on the contents of `/proc/mtd` instead to check for
the existence of the `rootfs_data` partition.
Fixes: #3136
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Some firmware images may not support preserving backup. In such cases
display a warning and disable relevant checkbox.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Some validation errors may be critical enough to prevent sysupgrade.
Check the "forceable" property and disallow forcing sysupgrade if
applicable. It would fail anyway at the "sysupgrade" call.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This new ubus method provides more properly-formatted details about
firmware file. Use it to check if uploaded image is valid.
The old "sysupgrade --test" method is left for now to provide stderr
output.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[Added missing ACL, add default value for the ubus failure case]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Rename the procedure to prevent a name clash with the standard view action
which we intentionally disable.
Ref: 3c40a7450a (commitcomment-35233207)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>