Use SUBPROJECT=minimized name instead of SUBPROJECT=minimize for consistency

ubuntu/artful
Balint Reczey 7 years ago
parent d496915741
commit 2ef2aee456

@ -45,14 +45,14 @@ Expire-Date: 0
lb bootstrap "$@" lb bootstrap "$@"
if [ "$SUBPROJECT" = minimize ] \ if [ "$SUBPROJECT" = minimized ] \
&& ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then
# workaround for tzdata purge not removing these files # workaround for tzdata purge not removing these files
rm -f chroot/etc/localtime chroot/etc/timezone rm -f chroot/etc/localtime chroot/etc/timezone
fi fi
if [ "$SUBPROJECT" = minimize ]; then if [ "$SUBPROJECT" = minimized ]; then
# set up dpkg filters to skip installing docs on minimized system # set up dpkg filters to skip installing docs on minimizedd system
mkdir -p chroot/etc/dpkg/dpkg.cfg.d mkdir -p chroot/etc/dpkg/dpkg.cfg.d
cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <<EOF cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <<EOF
# Drop all man pages # Drop all man pages

@ -238,7 +238,7 @@ esac
SIGNED_KERNEL_PACKAGE="linux-signed-generic" SIGNED_KERNEL_PACKAGE="linux-signed-generic"
if [ "$SUBPROJECT" = minimize ]; then if [ "$SUBPROJECT" = minimized ]; then
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
fi fi
@ -528,7 +528,7 @@ case $PROJECT in
;; ;;
ubuntu-cpc) ubuntu-cpc)
if [ "$SUBPROJECT" = minimize ]; then if [ "$SUBPROJECT" = minimized ]; then
add_task install cloud-image add_task install cloud-image
add_package install sudo add_package install sudo
else else

@ -121,7 +121,7 @@ if [ "${should_install_grub}" -eq 1 ]; then
rm mountpoint/tmp/device.map rm mountpoint/tmp/device.map
if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then if [ "$SUBPROJECT" = minimized ] && [ -n "$partuuid" ]; then
echo "partuuid found for root device; forcing it in Grub" echo "partuuid found for root device; forcing it in Grub"
mkdir -p mountpoint/etc/default/grub.d mkdir -p mountpoint/etc/default/grub.d
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid

@ -62,7 +62,7 @@ install_grub() {
efi_boot_dir="/boot/efi/EFI/BOOT" efi_boot_dir="/boot/efi/EFI/BOOT"
chroot mountpoint mkdir -p "${efi_boot_dir}" chroot mountpoint mkdir -p "${efi_boot_dir}"
if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then if [ "$SUBPROJECT" = minimized ] && [ -n "$partuuid" ]; then
# FIXME: code duplicated between 032-disk-image.binary # FIXME: code duplicated between 032-disk-image.binary
# and 033-disk-image-uefi.binary. We want to fix this to not # and 033-disk-image-uefi.binary. We want to fix this to not
# have initramfs-tools installed at all on these images. # have initramfs-tools installed at all on these images.

@ -59,7 +59,7 @@ _xchroot "${rootd}" sh -c 'sed -i "/^127.0.1.1/d" /etc/hosts'
_xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*' _xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*'
## -------------- ## --------------
if [ "${SUBPROJECT:-}" != minimize ]; then if [ "${SUBPROJECT:-}" != minimized ]; then
_xchroot "${rootd}" locale-gen en_US.utf8 _xchroot "${rootd}" locale-gen en_US.utf8
fi fi

Loading…
Cancel
Save