cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [07/13] git commit: updated refs/heads/master to 54039f9
Date Mon, 18 Jul 2016 18:12:43 GMT
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.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/343ea609
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/343ea609
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/343ea609

Branch: refs/heads/master
Commit: 343ea6098e1884df410484149ed71ad8f51f4ec3
Parents: 1f9bf93
Author: Wido den Hollander <wido@widodh.nl>
Authored: Tue Jul 12 08:46:11 2016 +0200
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Tue Jul 12 10:13:23 2016 +0200

----------------------------------------------------------------------
 debian/cloudstack-management.postinst | 5 +++++
 packaging/centos63/cloud.spec         | 4 ++++
 packaging/centos7/cloud.spec          | 4 ++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index 145d1ea..e37813f 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -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#

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index c267e8f..2858395 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -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/

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/packaging/centos7/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index b99d950d8..8d2ddc4 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -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/


Mime
View raw message