Skip to content

Commit

Permalink
Fix system_upgrade prompt output
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
  • Loading branch information
ecdye committed Nov 23, 2024
1 parent 7d97bd8 commit cc8a860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/system.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ system_upgrade() {
local upgradeText="ATTENTION !\\n\\nYou chose upgrade ALL of your software packages in one go.\\nNote this will include upgrading openHAB itself to its latest version which might be a major upgrade and can break your working system.\\n\\n Are you sure this is what you want?\\n"
local OH4upgradeText="ATTENTION !\\n\\nYou chose to upgrade ALL of your software packages\\nThis is not possible when you are not on the current major version of openHAB, OH4.\\n\\nIn order to upgrade to openHAB 4 first, use the next menu option."

echo "$(timestamp) [openHABian] Updating repositories and upgrading installed packages..."
if [[ -n "$INTERACTIVE" ]]; then
if openhab4_is_installed; then
if (whiptail --title "Upgrade ALL software" --yes-button "Continue" --no-button "Cancel" --yesno "$upgradeText" 12 80); then echo "OK"; else echo "CANCELED"; return 1; fi
if ! (whiptail --title "Upgrade ALL software" --yes-button "Continue" --no-button "Cancel" --yesno "$upgradeText" 12 80); then echo "CANCELED"; return 1; fi
else
whiptail --title "Old openHAB version" --msgbox "$OH4upgradeText" 7 80
return 1
fi
fi

echo "$(timestamp) [openHABian] Updating repositories and upgrading installed packages..."
export DEBIAN_FRONTEND=noninteractive
if ! apt-get clean --yes -o DPkg::Lock::Timeout="$APTTIMEOUT"; then echo "FAILED"; return 1; fi
# bad packages may require interactive input despite of this setting so do not mask output (no cond_redirect)
Expand Down

0 comments on commit cc8a860

Please sign in to comment.