@@ -276,6 +276,42 @@ load_feature_properties()
276276 fi
277277}
278278
279+
280+ # - Description: Unloads properties loaded from the ${FEATURE_KEYNAME}.dat.sh and functions from the
281+ # ${FEATURE_KEYNAME}.func.sh
282+ # - Permissions: Can be executed indifferently as root or user.
283+ # - Argument 1: Keyname of the properties to unload.
284+ unload_feature_properties ()
285+ {
286+ # Unload functions
287+ unset -f " $1 _install_pre"
288+ unset -f " $1 _install_mid"
289+ unset -f " $1 _install_post"
290+ unset -f " $1 _uninstall_pre"
291+ unset -f " $1 _uninstall_mid"
292+ unset -f " $1 _uninstall_post"
293+
294+ # Unload properties from the .dat.sh
295+ if [ -f " ${CUSTOMIZER_PROJECT_FOLDER} /data/features/$1 /$1 .dat.sh" ]; then
296+ # Select non-commentary lines
297+ while read -r line; do
298+ local variable
299+ variable=" $( echo " ${line} " | grep -v " ^[[:blank:]]*#" | cut -d " =" -f1) "
300+ if [ -z " ${variable} " ]; then
301+ continue
302+ fi
303+ unset " ${variable} "
304+ done < " ${CUSTOMIZER_PROJECT_FOLDER} /data/features/$1 /$1 .dat.sh"
305+ else
306+ output_proxy_executioner " Properties of $1 feature have not been found, so they can not be unloaded. The file
307+ ${CUSTOMIZER_PROJECT_FOLDER} /data/features/$1 /$1 .dat.sh does not exist. " " ERROR"
308+ fi
309+
310+ # Finally unset ${FEATURENAME}_flagsruntime, which is a dynamically declared variable
311+ unset " $1 _flagsruntime"
312+ }
313+
314+
279315# - Description: Performs a post-install clean by using cleaning option of package manager
280316# - Permission: Can be called as root or user.
281317post_install_clean ()
@@ -918,6 +954,9 @@ execute_installation()
918954 load_feature_properties " ${CURRENT_INSTALLATION_KEYNAME} "
919955
920956 output_proxy_executioner " generic_installation ${keyname} " " COMMAND"
957+
958+ unload_feature_properties " ${CURRENT_INSTALLATION_KEYNAME} "
959+
921960 output_proxy_executioner " ${keyname} ${FLAG_MODE} ed." " INFO"
922961
923962 # Return flag errors to bash defaults (ignore errors)
0 commit comments