packaging: Add db.X.driver=jdbc:mysql to db.properties on upgrade

This is required afther the upgrade to 4.9.0 and for convience we
add this to the configuration so our users do not have to.
This commit is contained in:
Wido den Hollander 2016-07-12 08:46:11 +02:00
parent 1f9bf93948
commit 343ea6098e
No known key found for this signature in database
GPG Key ID: 019B582DDB3ECA42
3 changed files with 13 additions and 0 deletions

View File

@ -58,6 +58,11 @@ if [ "$1" = configure ]; then
chmod 0640 /etc/cloudstack/management/db.properties
chgrp cloud /etc/cloudstack/management/db.properties
invoke-rc.d tomcat6 stop || true
# Add jdbc MySQL driver settings to db.properties if not present
grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
fi
#DEBHELPER#

View File

@ -408,6 +408,10 @@ if [ "$1" == "1" ] ; then
/sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
fi
grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then
echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in
echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/

View File

@ -363,6 +363,10 @@ if [ "$1" == "1" ] ; then
/usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
fi
grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then
echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in
echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/