Skip to content

Install scripts: fix a path postinstall-status file and fix error handling

Dmitry Petrov requested to merge fix_mr48 into main

The previous MR !48 (merged) was merged too early — we were still testing this MR on various configurations at that moment. So, we assigned a "Draft" status. Sorry.

During this testing I found two problems, which current MR addresses:

  • wrong path for $POSTINSTALL_STATUS_FILE
  • missing invert of exit code for sed command in prepare-bootpartition.sh

The second issue is obvious, so let me provide more detailed description for the first problem below.
It occurred when a status file was not found in do_installation():

cat: can't open '/mnt/target/var/volatile//tmp/yocto-postinstall-status': No such file or directory

This happened because:

  • a target rootfs was not mounted at that moment
  • ${ABSTARGETTMP}/tmp was not persistent (all files were removed after umount).

And to solve this problem, I switched back to /tmp as it's shared between fngsystem and target rootfs:
https://git.seco.com/seco-ne/tools/yocto-install/-/blob/29c7a97d5fa53061d4496e1b6a3019c2640a36d7/install-scripts/fng-install.sh.in#L220

mount -o bind /tmp $TARGETROOT/tmp
Edited by Dmitry Petrov

Merge request reports

Loading