mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CLOUDSTACK-5042: change cloud.keystore to cloudmanagementserver.keystore and install it (cherry picked from commit de448ec4792eda5b47d79b26e9cb8ce96a2b22f4)
This commit is contained in:
		
							parent
							
								
									edf04a33c1
								
							
						
					
					
						commit
						57ba367f3c
					
				
							
								
								
									
										5
									
								
								debian/cloudstack-management.postinst
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								debian/cloudstack-management.postinst
									
									
									
									
										vendored
									
									
								
							| @ -35,7 +35,7 @@ if [ "$1" = configure ]; then | |||||||
| 
 | 
 | ||||||
|     OLDCONFDIR="/etc/cloud/management" |     OLDCONFDIR="/etc/cloud/management" | ||||||
|     NEWCONFDIR="/etc/cloudstack/management" |     NEWCONFDIR="/etc/cloudstack/management" | ||||||
|     CONFFILES="db.properties cloud.keystore key" |     CONFFILES="db.properties key" | ||||||
| 
 | 
 | ||||||
|     # Copy old configuration so the admin doesn't have to do that |     # Copy old configuration so the admin doesn't have to do that | ||||||
|     # Only do so when we are installing for the first time |     # Only do so when we are installing for the first time | ||||||
| @ -45,6 +45,9 @@ if [ "$1" = configure ]; then | |||||||
|                 cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE |                 cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE | ||||||
|             fi |             fi | ||||||
|         done |         done | ||||||
|  |         if [ -f "$OLDCONFDIR/cloud.keystore" ]; then | ||||||
|  |             cp -a $OLDCONFDIR/cloud.keystore $NEWCONFDIR/cloudmanagementserver.keystore | ||||||
|  |         fi | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     chmod 0640 /etc/cloudstack/management/db.properties |     chmod 0640 /etc/cloudstack/management/db.properties | ||||||
|  | |||||||
| @ -252,7 +252,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/cl | |||||||
| rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms | rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms | ||||||
| 
 | 
 | ||||||
| for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \ | for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \ | ||||||
|             catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties ; do |             catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties cloudmanagementserver.keystore ; do | ||||||
|   mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \ |   mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \ | ||||||
|     ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name |     ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name | ||||||
| done | done | ||||||
| @ -450,6 +450,13 @@ else | |||||||
|     echo "Unable to determine ssl settings for tomcat.conf, please run cloudstack-setup-management manually" |     echo "Unable to determine ssl settings for tomcat.conf, please run cloudstack-setup-management manually" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | if [ -f "%{_sysconfdir}/cloud.rpmsave/management/cloud.keystore" ]; then | ||||||
|  |     mv %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore.rpmnew | ||||||
|  |     cp -p %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore | ||||||
|  |     # 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/cloud.keystore %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore.rpmsave | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| %preun agent | %preun agent | ||||||
| /sbin/service cloudstack-agent stop || true | /sbin/service cloudstack-agent stop || true | ||||||
| if [ "$1" == "0" ] ; then | if [ "$1" == "0" ] ; then | ||||||
| @ -539,6 +546,7 @@ fi | |||||||
| %config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties | %config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties | ||||||
| %config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties | %config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties | ||||||
| %config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties | %config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties | ||||||
|  | %config(noreplace) %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore | ||||||
| %attr(0755,root,root) %{_initrddir}/%{name}-management | %attr(0755,root,root) %{_initrddir}/%{name}-management | ||||||
| %attr(0755,root,root) %{_bindir}/%{name}-setup-management | %attr(0755,root,root) %{_bindir}/%{name}-setup-management | ||||||
| %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses | %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses | ||||||
|  | |||||||
| @ -584,7 +584,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio | |||||||
|         File confFile = PropertiesUtil.findConfigFile("db.properties"); |         File confFile = PropertiesUtil.findConfigFile("db.properties"); | ||||||
|         /* This line may throw a NPE, but that's due to fail to find db.properities, meant some bugs in the other places */ |         /* This line may throw a NPE, but that's due to fail to find db.properities, meant some bugs in the other places */ | ||||||
|         String confPath = confFile.getParent(); |         String confPath = confFile.getParent(); | ||||||
|         String keystorePath = confPath + "/cloud.keystore"; |         String keystorePath = confPath + "/cloudmanagementserver.keystore"; | ||||||
|         File keystoreFile = new File(keystorePath); |         File keystoreFile = new File(keystorePath); | ||||||
|         boolean dbExisted = (dbString != null && !dbString.isEmpty()); |         boolean dbExisted = (dbString != null && !dbString.isEmpty()); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user