Skip to content

Commit 06a8f5f

Browse files
committed
Refuse to install openHAB 5 if no Java 21 is available (after potential Java install)
Signed-off-by: Markus Storm <markus.storm@gmx.net>
1 parent 9b42a9f commit 06a8f5f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

functions/openhab.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ openhab_setup() {
3333
local successText
3434
local noJVMText="We were unable to install/upgrade your system to openHAB 5.\\nThis requires Java version 21, and we have been unable to identify and install a suitable Java JVM package for your hardware-OS combo."
3535
local ohPkgName="openhab"
36+
local textsize=9
3637

3738
if [[ $1 == "snapshot" || $1 == "unstable" ]]; then
3839
introText="Proceed with caution!\\n\\nYou are about to switch over to the latest $ohPkgName unstable snapshot build. The daily snapshot builds contain the latest features and improvements but might also suffer from bugs or incompatibilities. Please be sure to take a full openHAB configuration backup first!\\n\\nBeware that downgrading will not be possible, you can only re-install old software and re-important the config backup you should have made before the upgrade."
@@ -95,10 +96,11 @@ openhab_setup() {
9596
echo "FAILED (could not install required Java 21)"
9697
if [[ -n $INTERACTIVE ]]; then
9798
unset DEBIAN_FRONTEND
98-
if [[ "$(getconf LONG_BIT)" == "32" ]]; then
99-
noJVMText+="\\nThere is currently no suitable JVM package for ARM processors that works with a 32 bit OS image."
99+
if is_arm && [[ "$(getconf LONG_BIT)" == "32" ]]; then
100+
noJVMText+="\\n\\nThere is currently no suitable JVM package for ARM processors that works\\nwith a 32 bit OS image."
101+
textsize=12
100102
fi
101-
whiptail --title "Operation failed!" --msgbox "$noJVMText" 10 80
103+
whiptail --title "Operation failed!" --msgbox "$noJVMText" ${textsize} 80
102104
fi
103105
return 1
104106
fi

0 commit comments

Comments
 (0)