luci-mod-system: use "system" new "validate_firmware_image" ubus method
authorRafał Miłecki <rafal@milecki.pl>
Wed, 25 Sep 2019 14:51:37 +0000 (16:51 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 2 Oct 2019 07:46:18 +0000 (09:46 +0200)
commit7c108683c6b65007e3ce8ce6db5e0e48aee87e2b
treec6e9219b78056937c48eced11c4ba408a6c9e167
parentb2809cebd8009e7a68e2ad7da95b6335e1e9527b
luci-mod-system: use "system" new "validate_firmware_image" ubus method

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>
modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js