Skip to content

base-files: sysupgrade: Define the cached file location in the iopversion setter

Ghost User requested to merge ovil/fixup-fwbank-version-set into devel

The fwbank scenario started to fail when the paths of commonly used files were refactored into top-level variables defining them: Let's assume two banks B1 and B2, B1 being the active one, B2 being the one to be upgraded.

  • call ubus call fwbank dump: giving us fwver V1 for B1, fwver V2 for B2
  • call sysupgrade <image.pkgtb>: V2 should be updated to, let's say V3
  • call ubus call fwbank dump: B2 firmware version is still V2, whereas it should be V3

It turns out that when this was refactored, the $iop_version_cached variable was not actually set. Thus, the 'rm -f' command at the end operated on an empty variable. Fix this by getting the bank id of the upgraded bank and constructing a path in /tmp/fwbank in function of this.

Merge request reports