You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2016/08/30 13:02:28 UTC

[1/2] git commit: updated refs/heads/4.9 to 0671a80

Repository: cloudstack
Updated Branches:
  refs/heads/4.9 b9801ef47 -> 0671a8097


Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file
And some improvements about the dir/file using variables


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

Branch: refs/heads/4.9
Commit: 6051fa503a2da7b96256f21e6b7c42aa1f3cb01e
Parents: 227ff38
Author: Milamber <mi...@apache.org>
Authored: Tue Aug 2 09:00:21 2016 +0100
Committer: Milamber <mi...@apache.org>
Committed: Tue Aug 30 08:29:06 2016 +0100

----------------------------------------------------------------------
 debian/cloudstack-management.postinst | 13 ++++++++-----
 packaging/centos63/cloud.spec         |  6 +++---
 packaging/centos7/cloud.spec          |  6 +++---
 3 files changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6051fa50/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index e37813f..e70a1a4 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -55,14 +55,17 @@ if [ "$1" = configure ]; then
         fi
     fi
 
-    chmod 0640 /etc/cloudstack/management/db.properties
-    chgrp cloud /etc/cloudstack/management/db.properties
+    CONFDIR="/etc/cloudstack/management"
+    DBPROPS="db.properties"
+
+    chmod 0640 ${CONFDIR}/${DBPROPS}
+    chgrp cloud ${CONFDIR}/${DBPROPS}
     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
+    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}
 fi
 
 #DEBHELPER#

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6051fa50/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 2858395..1c94a08 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -408,9 +408,9 @@ 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
+grep -s -q "db.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
+grep -s -q "db.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.usage.driver=jdbc:mysql" db.properties
+grep -s -q "db.simulator.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.simulator.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/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 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6051fa50/packaging/centos7/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index 8d2ddc4..451fa8f 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -363,9 +363,9 @@ 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
+grep -s -q "db.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
+grep -s -q "db.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.usage.driver=jdbc:mysql" db.properties
+grep -s -q "db.simulator.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.simulator.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/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


[2/2] git commit: updated refs/heads/4.9 to 0671a80

Posted by bh...@apache.org.
Merge pull request #1621 from milamberspace/FixPR1610_addLineReturn

[CLOUDSTACK-9444] Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file

And some improvements about the dir/file using variables

cc @wido @rhtyd

* pr/1621:
  Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file And some improvements about the dir/file using variables

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/4.9
Commit: 0671a80972cc1b268b84489b2c3b54644ad3fd4c
Parents: b9801ef 6051fa5
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Aug 30 18:31:58 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Aug 30 18:32:09 2016 +0530

----------------------------------------------------------------------
 debian/cloudstack-management.postinst | 13 ++++++++-----
 packaging/centos63/cloud.spec         |  6 +++---
 packaging/centos7/cloud.spec          |  6 +++---
 3 files changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0671a809/packaging/centos63/cloud.spec
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0671a809/packaging/centos7/cloud.spec
----------------------------------------------------------------------