2023-03-30 14:09:04 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2023-04-06 16:47:59 +02:00
|
|
|
set -eu
|
|
|
|
|
2023-04-13 09:45:04 +02:00
|
|
|
case ${PASS:-} in
|
2023-08-18 18:00:24 +02:00
|
|
|
standard.live)
|
2023-03-30 14:09:04 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2023-07-04 12:11:56 +12:00
|
|
|
# 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
|
2023-03-30 14:09:04 +02:00
|
|
|
|
|
|
|
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
|
2023-04-17 16:52:23 -07:00
|
|
|
|
|
|
|
if [ "$(dpkg --print-architecture)" = amd64 ]; then
|
|
|
|
echo "I: Enabling amd64 multiarch support on amd64"
|
|
|
|
dpkg --add-architecture i386
|
|
|
|
|
|
|
|
apt-get -y update
|
|
|
|
fi
|