diff --git a/debian/aegir3-hostmaster.postinst b/debian/aegir3-hostmaster.postinst index dc64d1d8f6079755c843a070f396e07ab9238e01..1964e9598251950689b75948ced1727f87b3bb51 100644 --- a/debian/aegir3-hostmaster.postinst +++ b/debian/aegir3-hostmaster.postinst @@ -115,12 +115,15 @@ case "$1" in db_get "aegir/db_host" AEGIR_DB_HOST="$RET" + # Read /etc/os-release to properly handle differences between distributions + OS_ID=$(grep ^ID /etc/os-release | cut -d= -f2) + # Determin if we create a db accoount or ask for it. # Starting from MariaDB 10.1... https://www.drupal.org/node/2770819 # TODO: Work with future versions - if dpkg -s mariadb-server-10.1 > /dev/null 2>&1 + if mysql --database=mysql --execute="show tables;" > /dev/null 2>&1 then - # MariaDB > 10.1 + # MariaDB = 10.1 CREATEUSER=1 else # Mysql & MariaDB < 10.1 diff --git a/scripts/ci-aegir-dev-install-apt-ubuntu-artful.sh b/scripts/ci-aegir-dev-install-apt-ubuntu-artful.sh index 726c2c7f574d6c7f2345135927908ab694315217..ee53aee4439528c9cd911ad7278c93b93d305642 100755 --- a/scripts/ci-aegir-dev-install-apt-ubuntu-artful.sh +++ b/scripts/ci-aegir-dev-install-apt-ubuntu-artful.sh @@ -2,7 +2,7 @@ # Install Aegir debian packages located in the 'build/' directory. # These are provided by the GitLab CI build stage. # -# This script is tuned for Ubuntu 16.04. +# This script is tuned for Ubuntu 17.10. # echo "[CI] Updating APT" sudo apt-get update @@ -12,9 +12,6 @@ echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections #echo "debconf debconf/priority select critical" | debconf-set-selections -echo mysql-server-5.7 mysql-server/root_password password PASSWORD | debconf-set-selections -echo mysql-server-5.7 mysql-server/root_password_again password PASSWORD | debconf-set-selections - debconf-set-selections <