rhtyd commented on a change in pull request #3910: Jdk11 auto select on upgrade
URL: https://github.com/apache/cloudstack/pull/3910#discussion_r386864663
 
 

 ##########
 File path: debian/cloudstack-management.postinst
 ##########
 @@ -63,6 +63,13 @@ if [ "$1" = configure ]; then
     grep -s -q "db.cloud.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS} || sed -i -e 
"\$adb.cloud.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS}
     grep -s -q "db.usage.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS} || sed -i -e 
"\$adb.usage.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS}
     grep -s -q "db.simulator.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS} || sed 
-i -e "\$adb.simulator.driver=jdbc:mysql" ${CONFDIR}/${DBPROPS}
+
+    # Check and switch to Java 11
+    JDK11_NAME=$(update-java-alternatives --list | grep 11 | head -1 |  grep 
-Eo '^[^ ]+')
+    if [ -z ${JDK11_NAME} ]; then
 
 Review comment:
   Ah yes, we want to do not empty, I'll fix.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to