From 94188611cfc41505595b8cd345edd3af96b47694 Mon Sep 17 00:00:00 2001 From: oiseauroch Date: Wed, 30 Nov 2022 11:40:43 +0100 Subject: [PATCH] export virtualisation var --- .gitignore | 3 +++ scripts/install | 2 ++ scripts/remove | 1 + scripts/restore | 1 + 4 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 783a4ae..73ff283 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *~ *.sw[op] +.apps/ +.apps_git_clone_cache +.spdx_licenses diff --git a/scripts/install b/scripts/install index 39228ae..88b9fbb 100755 --- a/scripts/install +++ b/scripts/install @@ -92,7 +92,9 @@ ynh_script_progression --message="Checking virtualisation availability…" --wei if [ "$(which modprobe)" = "" ] then virtualisation=false + export VIRTUALISATION=false else + export VIRTUALISATION=false virtualisation=true fi ynh_app_setting_set --app=$app --key=virtualisation --value=$virtualisation diff --git a/scripts/remove b/scripts/remove index 03a5e2a..83d917e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,6 +29,7 @@ virtualisation=$(ynh_app_setting_get --app=$app --key=virtualisation) if [ "$virtualisation" = "true" ] then nbd_index=$(ynh_app_setting_get --app=$app --key=nbd_index) + export VIRTUALISTATION=true fi #================================================= # REMOVE NODE CONFIGURATION diff --git a/scripts/restore b/scripts/restore index a12796e..e199ed4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -78,6 +78,7 @@ mkdir -p "$datadir/data" if [ "$virtualisation" = "true" ] then + export VIRTUALISATION=true # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies_virtualisation # to be sure to not exceed size limit, i use a virtual disk with a fix size to have a max limit size.