export virtualisation var

This commit is contained in:
oiseauroch 2022-11-30 11:40:43 +01:00
parent a0ee0ec724
commit 94188611cf
4 changed files with 7 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
*~ *~
*.sw[op] *.sw[op]
.apps/
.apps_git_clone_cache
.spdx_licenses

View File

@ -92,7 +92,9 @@ ynh_script_progression --message="Checking virtualisation availability…" --wei
if [ "$(which modprobe)" = "" ] if [ "$(which modprobe)" = "" ]
then then
virtualisation=false virtualisation=false
export VIRTUALISATION=false
else else
export VIRTUALISATION=false
virtualisation=true virtualisation=true
fi fi
ynh_app_setting_set --app=$app --key=virtualisation --value=$virtualisation ynh_app_setting_set --app=$app --key=virtualisation --value=$virtualisation

View File

@ -29,6 +29,7 @@ virtualisation=$(ynh_app_setting_get --app=$app --key=virtualisation)
if [ "$virtualisation" = "true" ] if [ "$virtualisation" = "true" ]
then then
nbd_index=$(ynh_app_setting_get --app=$app --key=nbd_index) nbd_index=$(ynh_app_setting_get --app=$app --key=nbd_index)
export VIRTUALISTATION=true
fi fi
#================================================= #=================================================
# REMOVE NODE CONFIGURATION # REMOVE NODE CONFIGURATION

View File

@ -78,6 +78,7 @@ mkdir -p "$datadir/data"
if [ "$virtualisation" = "true" ] if [ "$virtualisation" = "true" ]
then then
export VIRTUALISATION=true
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies_virtualisation 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. # to be sure to not exceed size limit, i use a virtual disk with a fix size to have a max limit size.