As with the previous similar changes, this is intended to catch problems as they happen instead of ignoring them and continuing on to potentially fail later. Setting this on all existing scripts will allow us to enforce use via Jenkins. Change-Id: Iad2d490c86dceab148ea9ab08f457c49a5d5352e
		
			
				
	
	
		
			19 lines
		
	
	
		
			537 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			537 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
# Override the default /etc/apt/apt.conf with $DIB_APT_CONF
 | 
						|
 | 
						|
set -ue
 | 
						|
set -o pipefail
 | 
						|
 | 
						|
# exit directly if DIB_APT_CONF is not defined properly
 | 
						|
if [ -z "${DIB_APT_CONF:-}" ] ; then
 | 
						|
    echo "DIB_APT_CONF is not set - no apt.conf will be copied in"
 | 
						|
    exit 0
 | 
						|
elif [ ! -f "$DIB_APT_CONF" ] ; then
 | 
						|
    echo "$DIB_APT_CONF is not a valid apt.conf file."
 | 
						|
    echo "You should assign a proper apt.conf file in DIB_APT_CONF"
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
# copy the apt.conf to cloudimg
 | 
						|
sudo cp -L -f $DIB_APT_CONF $TMP_MOUNT_PATH/etc/apt/apt.conf
 |