Previously, only http_proxy was copied into the local-config image. We now preserve both http_proxy and https_proxy settings. Change-Id: I4de2712f2772fb7d07b228cecdc0c8ec6f3df567 Co-authored-by: Chris Krelle <nobodycam@gmail.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			704 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			704 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
# Save the HTTP if one is available.
 | 
						|
# XXX: Obviously not suitable for downloadable images.
 | 
						|
 | 
						|
set -e
 | 
						|
set -o xtrace
 | 
						|
 | 
						|
if [ -n "$http_proxy" ]; then
 | 
						|
   if [ -d ~stack ]; then
 | 
						|
      echo export http_proxy=$http_proxy >> ~stack/.profile
 | 
						|
   fi
 | 
						|
   echo "Acquire::http::Proxy \"$http_proxy\";"  > /etc/apt/apt.conf.d/61-use-http-proxy
 | 
						|
fi
 | 
						|
 | 
						|
if [ -n "$https_proxy" ]; then
 | 
						|
   if [ -d ~stack ]; then
 | 
						|
      echo export https_proxy=$https_proxy >> ~stack/.profile
 | 
						|
   fi
 | 
						|
   echo "Acquire::https::Proxy \"$https_proxy\";"  > /etc/apt/apt.conf.d/61-use-https-proxy
 | 
						|
fi
 | 
						|
 | 
						|
if [ -n "$http_proxy" -o -n "$https_proxy"]; then
 | 
						|
   if [ -d ~stack ]; then
 | 
						|
      echo export no_proxy=192.0.2.1 >> ~stack/.profile
 | 
						|
   fi
 | 
						|
fi
 |