e9b1c817c2560280e0374fa46debde4de2f7ebea max Fri Mar 4 05:52:10 2022 -0800 the neverending bug fix series of gbic continues, refs #28348 diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh old mode 100755 new mode 100644 index 590b84e..4e4f567 --- src/product/installer/browserSetup.sh +++ src/product/installer/browserSetup.sh @@ -502,51 +502,55 @@ { echo2 echo2 Press any key to continue or CTRL-C to abort. read -n 1 echo2 } # set MYCNF to the path to my.cnf function setMYCNF () { if [ -f /etc/my.cnf.d/mariadb-server.cnf ] ; then # Centos 8 stream: This has to be first, because /etc/my.cnf exists on Centos 8 Stream, but it contains a mysqld section # by default and somehow the section doesn't seem to take effect since a specific [mariadb] section also exists in the mariadb-server.cnf. # As a result, we only modify the mariadb-server config file MYCNF=/etc/my.cnf.d/mariadb-server.cnf + elif [ -f /etc/mysql/mariadb.conf.d/*-server.cnf ] ; then + # Ubuntu with mariadb. Must come before etc/my.cnf + MYCNF=/etc/mysql/mariadb.conf.d/*-server.cnf + elif [ -f /etc/mysql/mysql.conf.d/mysqld.cnf ] ; then + # Ubuntu 16, 18, 20 with mysqld + MYCNF=/etc/mysql/mysql.conf.d/mysqld.cnf elif [ -f /etc/my.cnf ] ; then - # Centos 6-8 + # generic Centos 6-8 MYCNF=/etc/my.cnf elif [ -f /etc/mysql/my.cnf ] ; then - # Ubuntu 14 + # generic Ubuntu 14 MYCNF=/etc/mysql/my.cnf - elif [ -f /etc/mysql/mysql.conf.d/mysqld.cnf ] ; then - # Ubuntu 16, 18, 20 - MYCNF=/etc/mysql/mysql.conf.d/mysqld.cnf else echo Could not find my.cnf. Adapt 'setMYCNF()' in browserSetup.sh and/or contact us. exit 1 fi echo Found Mariadb config file: $MYCNF } function mysqlStrictModeOff () { # make sure that missing values in mysql insert statements do not trigger errors, #18368 = deactivate strict mode # This must happen before Mariadb is started or alternative Mariadb must be restarted after this has been done setMYCNF +echo Deactivating MySQL strict mode sed -Ei '/^.(mysqld|server).$/a sql_mode=' $MYCNF } function mysqlAllowOldPasswords # mysql >= 8 does not allow the old passwords anymore. But our client is still compiled # with the old, non-SHA256 encryption. So we must deactivate this new feature. # What will MariaDB do? { echo2 'Checking for Mysql version >= 8' MYSQLMAJ=`mysql -e 'SHOW VARIABLES LIKE "version";' -NB | cut -f2 | cut -d. -f1` setMYCNF if [ "$MYSQLMAJ" -ge 8 ] ; then echo2 'Mysql >= 8 found, checking if default-authentication allows native passwords' if grep -q default-authentication $MYCNF; then