Updated Branches: refs/heads/4.1 fe1113f2f -> b86b1d925
CLOUDSTACK-1900 : Save a default db.properties during upgrade, and make sure we only pull the old configs once. Signed-off-by: Marcus Sorensen <[email protected]> 1364966964 -0600 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b86b1d92 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b86b1d92 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b86b1d92 Branch: refs/heads/4.1 Commit: b86b1d925055e36c79b75f63b8c1e611db94fd15 Parents: fe1113f Author: Marcus Sorensen <[email protected]> Authored: Tue Apr 2 23:29:24 2013 -0600 Committer: Chip Childers <[email protected]> Committed: Wed Apr 3 14:44:40 2013 +0100 ---------------------------------------------------------------------- packaging/centos63/cloud.spec | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b86b1d92/packaging/centos63/cloud.spec ---------------------------------------------------------------------- diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 4966e11..dd71956 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -366,9 +366,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 @@ -410,6 +413,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
