diff --git a/src/freedombone-addremove b/src/freedombone-addremove index f93b3eb7..19aefd18 100755 --- a/src/freedombone-addremove +++ b/src/freedombone-addremove @@ -165,6 +165,12 @@ function remove_apps_selected { return fi + if [ -f /tmp/.upgrading ]; then + dialog --title $"Cannot remove apps" \ + --msgbox $"A system upgrade is happening, so apps cannot be removed at this time" 6 60 + return + fi + # ask for confirmation dialog --title $"Remove applications" \ --backtitle $"Freedombone" \ @@ -212,6 +218,12 @@ function install_apps_selected { fi if [[ "$select_all_apps" != "add-all" ]]; then + if [ -f /tmp/.upgrading ]; then + dialog --title $"Cannot install apps" \ + --msgbox $"A system upgrade is happening, so apps cannot be installed at this time" 6 60 + return + fi + # ask for confirmation if [ $n -eq 1 ]; then dialog --title $"$installs" \ diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index a03d3766..ee945812 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -496,6 +496,10 @@ function list_chosen_apps { } function remove_apps { + if [ -f /tmp/.upgrading ]; then + return + fi + app_index=0 # shellcheck disable=SC2068 for a in ${APPS_AVAILABLE[@]} @@ -617,6 +621,10 @@ function remove_users_for_app { function install_apps { is_interactive=$1 + if [ -f /tmp/.upgrading ]; then + return + fi + APP_INSTALLED_SUCCESS=1 # interactive install configuration for each app