cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/master to 04a511a
Date Wed, 03 Apr 2013 05:30:53 GMT
Updated Branches:
  refs/heads/master 2dbdc4633 -> 04a511a1a


CLOUDSTACK-1900 : Save a default db.properties during upgrade, and make sure
we only pull the old configs once.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1364966964 -0600


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

Branch: refs/heads/master
Commit: 04a511a1a828a829962681525780f80935a161f9
Parents: 2dbdc46
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Apr 2 23:29:24 2013 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Apr 2 23:29:24 2013 -0600

----------------------------------------------------------------------
 packaging/centos63/cloud.spec |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a511a1/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 7d6e638..5baf58f 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -363,9 +363,12 @@ if getent passwd cloud | grep -q /var/lib/cloud; then
 fi
 
 # if saved configs from upgrade exist, copy them over
-if [ -d "%{_sysconfdir}/cloud.rpmsave/management" ]; then
+if [ -f "%{_sysconfdir}/cloud.rpmsave/management/db.properties" ]; then
+    mv %{_sysconfdir}/%{name}/management/db.properties %{_sysconfdir}/%{name}/management/db.properties.rpmnew
     cp -p %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/%{name}/management
     cp -p %{_sysconfdir}/cloud.rpmsave/management/key %{_sysconfdir}/%{name}/management
+    # make sure we only do this on the first install of this RPM, don't want to overwrite
on a reinstall
+    mv %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/cloud.rpmsave/management/db.properties.rpmsave
 fi
 
 # Choose server.xml and tomcat.conf links based on old config, if exists
@@ -407,6 +410,8 @@ fi
 if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then
     mv %{_sysconfdir}/%{name}/agent/agent.properties  %{_sysconfdir}/%{name}/agent/agent.properties.rpmnew
     cp -p %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/%{name}/agent
+    # make sure we only do this on the first install of this RPM, don't want to overwrite
on a reinstall
+    mv %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/cloud.rpmsave/agent/agent.properties.rpmsave
 fi
 
 #%post awsapi


Mime
View raw message