fwbank: rebase the api on top of the new sysupgrade
This MR:
- makes it so that do_stage2 sets the status of the firmware bank being upgraded, as it has the knowledge of what's going on
- replaces the '-d' cmdline switch of sysupgrade with two new ones being '--no-activate' and '--no-reboot', to have a more fine-grained control over the upgrade process
- makes the ubus api "upgrade" method directly call sysupgrade, without jumping through hoops with
nohup
as we did before.
In the upgrade
method of the ubus fwbank API, right now I call sysupgrade and redirect its output to /dev/null, as otherwise ubus will not recognize any JSON on the command output and will fail. I wonder if this is the most "elegant" solution...
Edited by Ghost User