cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [1/2] git commit: updated refs/heads/4.2 to 76dab96
Date Wed, 23 Oct 2013 10:35:45 GMT
Updated Branches:
  refs/heads/4.2 fa88fb146 -> 76dab960d
  refs/heads/master 00e57c071 -> 294b0c727


CLOUDSTACK-4921 : Add usage service to chkconfig


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

Branch: refs/heads/4.2
Commit: 76dab960da8ff6a2a5b43d9b9023b07514268ea7
Parents: fa88fb1
Author: Kishan Kavala <kishan@cloud.com>
Authored: Wed Oct 23 11:24:54 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Wed Oct 23 16:04:24 2013 +0530

----------------------------------------------------------------------
 packaging/centos63/cloud.spec | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76dab960/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 1e88ea7..30be744 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -495,11 +495,20 @@ if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then
     mv %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/cloud.rpmsave/agent/agent.properties.rpmsave
 fi
 
+%preun usage
+/sbin/service cloudstack-usage stop || true
+if [ "$1" == "0" ] ; then
+    /sbin/chkconfig --del cloudstack-usage > /dev/null 2>&1 || true
+    /sbin/service cloudstack-usage stop > /dev/null 2>&1 || true
+fi
+
 %post usage
 if [ -f "%{_sysconfdir}/%{name}/management/db.properties" ]; then
     echo Replacing db.properties with management server db.properties
     rm -f %{_sysconfdir}/%{name}/usage/db.properties
     ln -s %{_sysconfdir}/%{name}/management/db.properties %{_sysconfdir}/%{name}/usage/db.properties
+    /sbin/chkconfig --add cloudstack-usage > /dev/null 2>&1 || true
+    /sbin/chkconfig --level 345 cloudstack-usage on > /dev/null 2>&1 || true
 fi
 
 #%post awsapi


Mime
View raw message