You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			33 lines
		
	
	
		
			1022 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			33 lines
		
	
	
		
			1022 B
		
	
	
	
		
			Bash
		
	
#!/bin/sh
 | 
						|
 | 
						|
# Handle systems where /lib is not merged in /usr/lib
 | 
						|
if [ ! -h /lib ]; then
 | 
						|
    mv /usr/lib/live/config/* /lib/live/config/
 | 
						|
fi
 | 
						|
 | 
						|
# Enable cryptsetup in the initramfs for later use if the user
 | 
						|
# adds an encrypted persistence partition.
 | 
						|
# This is until https://bugs.debian.org/908220 has a proper fix.
 | 
						|
if [ -e /etc/cryptsetup-initramfs/conf-hook ]; then
 | 
						|
    if grep -q '^#CRYPTSETUP=' /etc/cryptsetup-initramfs/conf-hook; then
 | 
						|
	sed -i -e 's/^#CRYPTSETUP=.*/CRYPTSETUP=y/' /etc/cryptsetup-initramfs/conf-hook
 | 
						|
    else
 | 
						|
	echo "CRYPTSETUP=y" >>/etc/cryptsetup-initramfs/conf-hook
 | 
						|
    fi
 | 
						|
fi
 | 
						|
 | 
						|
# Rebuild the initramfs to include the last change
 | 
						|
update-initramfs -u
 | 
						|
 | 
						|
# Run updatedb to initialize the database for the locate command
 | 
						|
if [ -x "$(which updatedb 2>/dev/null)" ]; then
 | 
						|
    updatedb
 | 
						|
fi
 | 
						|
 | 
						|
# Mark kernel related packages on hold so that they are not upgraded in
 | 
						|
# the live system
 | 
						|
for pkg in $(dpkg-query -W -f'${binary:Package}\n' 'linux-image-*' 'linux-headers-*' 'linux-kbuild-*')
 | 
						|
do
 | 
						|
    apt-mark hold $pkg
 | 
						|
done
 |