cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From frankzh...@apache.org
Subject git commit: updated refs/heads/master to e80fdcd
Date Fri, 09 Aug 2013 23:52:26 GMT
Updated Branches:
  refs/heads/master 52e10d6b2 -> e80fdcda9


Fix for CLOUDSTACK-3858, 2.2.14 does not contions symbolic link to create sever.xml, we need
to check both file or symbolic link exist or not in save folder


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

Branch: refs/heads/master
Commit: e80fdcda9452fc08cf227f50634e1c144af856cf
Parents: 52e10d6
Author: rayeesn <rayeesn@citrix.com>
Authored: Fri Aug 9 09:20:27 2013 -0700
Committer: frank <frank.zhang@citrix.com>
Committed: Fri Aug 9 17:02:14 2013 -0700

----------------------------------------------------------------------
 packaging/centos63/cloud.spec | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e80fdcda/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 4d5ca36..b94ff67 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -401,7 +401,9 @@ fi
 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
+    if [ -f "%{_sysconfdir}/cloud.rpmsave/management/key" ]; then    
+        cp -p %{_sysconfdir}/cloud.rpmsave/management/key %{_sysconfdir}/%{name}/management
+    fi
     # 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
@@ -409,27 +411,37 @@ fi
 # Choose server.xml and tomcat.conf links based on old config, if exists
 serverxml=%{_sysconfdir}/%{name}/management/server.xml
 oldserverxml=%{_sysconfdir}/cloud.rpmsave/management/server.xml
-if [ -L $oldserverxml ] ; then
-    if stat -c %N $oldserverxml | grep -q server-nonssl ; then
-        if [ -L $serverxml ]; then rm -f $serverxml; fi
-        ln -s %{_sysconfdir}/%{name}/management/server-nonssl.xml $serverxml
-    elif stat -c %N $oldserverxml| grep -q server-ssl ; then
-        if [ -L $serverxml ]; then rm -f $serverxml; fi
+if [ -f $oldserverxml ] || [ -L $oldserverxml ]; then
+    if stat -c %N $oldserverxml| grep -q server-ssl ; then
+        if [ -f $serverxml ] || [ -L $serverxml ]; then rm -f $serverxml; fi
         ln -s %{_sysconfdir}/%{name}/management/server-ssl.xml $serverxml
+        echo Please verify the server.xml in saved folder, and make the required changes
manually , saved folder available at
+        echo %{_sysconfdir}/%{name}/management
+    else
+        if [ -f $serverxml ] || [ -L $serverxml ]; then rm -f $serverxml; fi
+        ln -s %{_sysconfdir}/%{name}/management/server-nonssl.xml $serverxml
+        echo Please verify the server.xml in saved folder, and make the required changes
manually , saved folder available at
+        echo %{_sysconfdir}/%{name}/management
+
     fi
 else
     echo "Unable to determine ssl settings for server.xml, please run cloudstack-setup-management
manually"
 fi
 
+
 tomcatconf=%{_sysconfdir}/%{name}/management/tomcat6.conf
 oldtomcatconf=%{_sysconfdir}/cloud.rpmsave/management/tomcat6.conf
-if [ -L $oldtomcatconf ] ; then
-    if stat -c %N $oldtomcatconf | grep -q tomcat6-nonssl ; then
-        if [ -L $tomcatconf ]; then rm -f $tomcatconf; fi
-        ln -s %{_sysconfdir}/%{name}/management/tomcat6-nonssl.conf $tomcatconf
-    elif stat -c %N $oldtomcatconf| grep -q tomcat6-ssl ; then
-        if [ -L $tomcatconf ]; then rm -f $tomcatconf; fi
+if [ -f $oldtomcatconf ] || [ -L $oldtomcatconf ] ; then
+    if stat -c %N $oldtomcatconf| grep -q tomcat6-ssl ; then
+        if [ -f $tomcatconf ] || [ -L $tomcatconf ]; then rm -f $tomcatconf; fi
         ln -s %{_sysconfdir}/%{name}/management/tomcat6-ssl.conf $tomcatconf
+        echo Please verify the tomcat6.conf in saved folder, and make the required changes
manually , saved folder available at
+        echo %{_sysconfdir}/%{name}/management
+    else
+        if [ -f $tomcatconf ] || [ -L $tomcatconf ]; then rm -f $tomcatconf; fi
+        ln -s %{_sysconfdir}/%{name}/management/tomcat6-nonssl.conf $tomcatconf
+        echo Please verify the tomcat6.conf in saved folder, and make the required changes
manually , saved folder available at
+        echo %{_sysconfdir}/%{name}/management
     fi
 else
     echo "Unable to determine ssl settings for tomcat.conf, please run cloudstack-setup-management
manually"


Mime
View raw message