From 02985e0342e64f9a56793c1221c907c0fe1ae12d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 15 Oct 2022 21:25:09 +0200 Subject: [PATCH] Update ynh_lxd --- ynh_lxd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ynh_lxd b/ynh_lxd index 5e6abe7..7c1b65a 100644 --- a/ynh_lxd +++ b/ynh_lxd @@ -336,7 +336,7 @@ ynh_lxc_create(){ log_critical "Can't find base image $image" fi - if [ ! -z "$PACKAGE_CHECK_EXEC" ] + if [ ! -z "$FOR_PACKAGE_CHECK" ] then pipestatus="${PIPESTATUS[0]}" location=$(ynh_exec_as $app lxc list --format json | jq -e --arg name $name '.[] | select(.name==$name) | .location' | tr -d '"') @@ -346,7 +346,7 @@ ynh_lxc_create(){ fi _ynh_lxc_start_and_wait --name="$name" - if [ ! -z "$PACKAGE_CHECK_EXEC" ] + if [ ! -z "$FOR_PACKAGE_CHECK" ] then ynh_lxc_set_witness --name="$name" fi @@ -446,7 +446,7 @@ ynh_lxc_create_snapshot() { ynh_lxc_start_timer - if [ ! -z "$PACKAGE_CHECK_EXEC" ] + if [ ! -z "$FOR_PACKAGE_CHECK" ] then # Check all the witness files, to verify if them still here ynh_lxc_check_witness >&2 @@ -799,6 +799,8 @@ ynh_lxc_stop_timer() { # PACKAGE_CHECK helpers #================================================= +# ynh_lxd commands have to be launch with FOR_PACKAGE_CHECK=1 + # Start an LXC and execute a command in it, to be used for PACKAGE_CHECK_EXEC # # usage: ynh_lxc_exec --name=name --command=command