base-files: fix and clean up nand sysupgrade code
authorRodrigo Balerdi <lanchon@gmail.com>
Tue, 3 May 2022 06:31:48 +0000 (03:31 -0300)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 30 Oct 2022 14:29:56 +0000 (14:29 +0000)
commite25e6d8e5407119746cba624244a5ac1a5cdbc83
treee09e37c09dbcb63cdda0afffd21857f67d16f791
parentf4849c0ab7c4cb29a85667f2c16aaa73bbfa4315
base-files: fix and clean up nand sysupgrade code

- Never return from 'nand_do_upgrade', not even in case of errors, as that
  would cause execution of sysupgrade code not intended for NAND devices.
- Unify handling of sysupgrade success and failure.
- Detect and report more error conditions.
- Fix outdated/incorrect/unclear comments.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
package/base-files/files/lib/upgrade/nand.sh