Skip to content

lib: Fix U-Boot check_bootcounter

Since addition of EFI support, the bootcounter variables are shared between the different bootloader check parts.
Variables set using read function in pipe subshell are not available outside of this subshell, and so unset for the rest of the function.

This breaks aum-rollback-blacklist test, see here:

+ check_bootcounter   00 01
+ [ -f /boot/uboot.cnt ]
+ + read -r m ver cnt uflag
od -t x1 -An /boot/uboot.cnt
+ [ bd = bc ]
+ local ret=0
./run-test-rollback-blacklist.sh: 365: eval: m: parameter not set
+ error_occured

https://phabricator.apertis.org/T8409

Signed-off-by: Frédéric Danis frederic.danis@collabora.com

Merge request reports