We are almost there. Please also move the variable declaration into the
function and move the trap below the argument parser.
Once done, we probably should add a comment that above this line only
functions should be defined.
KAS_GIT_OVERLAY_FILE=""
kas_container_cleanup()
{
if [ -f "${KAS_GIT_OVERLAY_FILE}" ]; then
trace rm -f "${KAS_GIT_OVERLAY_FILE}"
fi
}
trap kas_container_cleanup EXIT INT TERM
Felix
>
> Jan
>
>
> CC: Cedric Hombourger <cedric.h...@siemens.com>
>
> Jan Kiszka (4):
> kas-container: Move setup_kas_dirs after argument parsing
> kas-container: Move setup_kas_dirs implementation close to
> check_and_expand
> kas-container: Initialize KAS_OPTIONS_DIRECT
> kas-container: Drop support for loop device
>
> kas-container | 60 +++++++++++++++------------------------------------
> 1 file changed, 17 insertions(+), 43 deletions(-)
>
> --
> 2.47.3
>
> --
> You received this message because you are subscribed to the Google Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kas-devel/cover.1780850358.git.jan.kiszka%40siemens.com.
Agree. Your patch "kas-container: Move kas_container_cleanup into scope
that requires it" perfectly solves this.
Felix