mirror of
				https://git.launchpad.net/livecd-rootfs
				synced 2025-11-03 18:34:11 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			876 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			876 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#! /bin/sh
 | 
						|
 | 
						|
set -eu
 | 
						|
 | 
						|
case ${PASS:-} in
 | 
						|
    minimal.standard.live)
 | 
						|
        ;;
 | 
						|
    *)
 | 
						|
        exit 0
 | 
						|
        ;;
 | 
						|
esac
 | 
						|
 | 
						|
# TODO: Make sure this is only executed for canary builds (in a way
 | 
						|
# other then relying on the fact that these hooks are only copied for
 | 
						|
# an ubuntu:canary build)
 | 
						|
 | 
						|
# As described in LP: #2025339, an initrd built from a jammy userspace
 | 
						|
# (which is what we use for canary builds currently) cannot fsck a
 | 
						|
# mantic root filesystem created with the default options.
 | 
						|
sed -i -e 's/,orphan_file//' /etc/mke2fs.conf
 | 
						|
 | 
						|
cat <<EOF > /etc/initramfs-tools/conf.d/casperize.conf
 | 
						|
export CASPER_GENERATE_UUID=1
 | 
						|
EOF
 | 
						|
 | 
						|
cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
 | 
						|
LAYERFS_PATH=${PASS}.squashfs
 | 
						|
EOF
 | 
						|
 | 
						|
if [ "$(dpkg --print-architecture)" = amd64 ]; then
 | 
						|
    echo "I: Enabling amd64 multiarch support on amd64"
 | 
						|
    dpkg --add-architecture i386
 | 
						|
 | 
						|
    apt-get -y update
 | 
						|
fi
 |