You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Container executions now load the user's environment.
This commit is contained in:
		| @@ -971,16 +971,16 @@ sub sectionChildProcess | ||||
|                 $self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $oHost->{strIP}, true); | ||||
|                 $$hCacheValue{ip} = $oHost->{strIP}; | ||||
|  | ||||
|                 # Execute cleanup commands | ||||
|                 # Add to the host group | ||||
|                 my $oHostGroup = hostGroupGet(); | ||||
|                 $oHostGroup->hostAdd($oHost); | ||||
|  | ||||
|                 # Execute initialize commands | ||||
|                 foreach my $oExecute ($oChild->nodeList('execute', false)) | ||||
|                 { | ||||
|                     $self->execute($oSection, $$hCacheKey{name}, $oExecute, $iDepth + 1, false); | ||||
|                 } | ||||
|  | ||||
|                 # Add to the host group | ||||
|                 my $oHostGroup = hostGroupGet(); | ||||
|                 $oHostGroup->hostAdd($oHost); | ||||
|  | ||||
|                 $self->cachePush($strCacheType, $hCacheKey, $hCacheValue); | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -153,6 +153,16 @@ | ||||
|     </contributor-list> | ||||
|  | ||||
|     <release-list> | ||||
|         <release date="XXXX-XX-XX" version="1.16dev" title="UNDER DEVELOPMENT"> | ||||
|             <release-doc-list> | ||||
|                 <release-refactor-list> | ||||
|                     <release-item> | ||||
|                         <p>Container executions now load the user's environment.</p> | ||||
|                     </release-item> | ||||
|                 </release-refactor-list> | ||||
|             </release-doc-list> | ||||
|         </release> | ||||
|  | ||||
|         <release date="2017-02-13" version="1.15" title="Refactoring and Bug Fixes"> | ||||
|             <release-core-list> | ||||
|                 <release-bug-list> | ||||
|   | ||||
| @@ -361,6 +361,10 @@ sub containerBuild | ||||
|             $strScript .= | ||||
|                 "RUN apt-get update\n" . | ||||
|                 "RUN apt-get -y install openssh-server wget\n"; | ||||
|  | ||||
|             $strScript .= | ||||
|                 "\n# Fix root tty\n" . | ||||
|                 "RUN sed -i 's/^mesg n/tty -s \\&\\& mesg n/g' /root/.profile\n"; | ||||
|         } | ||||
|  | ||||
|         # Add PostgreSQL packages | ||||
|   | ||||
| @@ -125,7 +125,7 @@ sub execute | ||||
|     $strCommand =~ s/'/'\\''/g; | ||||
|  | ||||
|     my $oExec = new pgBackRestTest::Common::ExecuteTest( | ||||
|         "docker exec -u ${strUser} $self->{strContainer} sh -c '${strCommand}'" , $oParam); | ||||
|         "docker exec -u ${strUser} $self->{strContainer} bash -l -c '${strCommand}'" , $oParam); | ||||
|  | ||||
|     # Return from function and log return values if any | ||||
|     return logDebugReturn | ||||
|   | ||||
| @@ -327,7 +327,7 @@ sub regExpReplaceAll | ||||
|  | ||||
|     # Replace the exe path/file with sh ' prepended | ||||
|     my $strLineBefore = $strLine; | ||||
|     $strLine =~ s/sh -c '$self->{strCommandMain}/[BACKREST-BIN]/g; | ||||
|     $strLine =~ s/bash -l -c '$self->{strCommandMain}/[BACKREST-BIN]/g; | ||||
|  | ||||
|     # Replace the final ' if the previous expression made changes | ||||
|     if ($strLine ne $strLineBefore) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user