luci-mod-admin-full: check backup.tar.gz on apply
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 15 May 2018 09:35:40 +0000 (11:35 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 3 Jul 2018 15:45:12 +0000 (17:45 +0200)
commit65ba4b8b8ae21fde49d0636bc1398940522322ff
tree393e8221a8a9d5178b668ff5bb296a4857cb4b8e
parentddbde3caaae267d400316d584e90991a579250d7
luci-mod-admin-full: check backup.tar.gz on apply

If an uploaded backup.tar.gz is not valid we will not get a respond from
LuCI. The system will perform a reboot without applying the "tar.gz"
even though the backup import failed.

To fix this check if the backup archive is valid with the command
"gunzip -t <archive>" and if the validation fails render the flashops page
with a hint. On the other hand apply the backup archive and perform a
reboot as before.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm