mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-11 13:17:21 +00:00
[ Ben Howard ] * live-build/ubuntu-cpc/hooks/042-vagrant.binary: add serial device for Vagrant images (LP: #1546108). [ Daniel Watkins ] * Refactor ubuntu-cpc hooks to hard-code producing an 'ext4' rootfs, which is used outside of the livecd-rootfs build process (specifically for EC2 publication).
33 lines
1.3 KiB
Bash
33 lines
1.3 KiB
Bash
#!/bin/bash -ex
|
|
|
|
if [ -n "$SUBARCH" ]; then
|
|
echo "Skipping rootfs build for subarch flavor build"
|
|
exit 0
|
|
fi
|
|
|
|
. /build/config/functions
|
|
|
|
mkdir binary/boot/filesystem.dir
|
|
cp -a chroot/* binary/boot/filesystem.dir
|
|
|
|
setup_mountpoint binary/boot/filesystem.dir
|
|
|
|
chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe
|
|
chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe
|
|
chroot binary/boot/filesystem.dir chmod +x /usr/sbin/grub-probe
|
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^linux-.*'
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^grub-.*'
|
|
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get autoremove --purge --assume-yes
|
|
chroot binary/boot/filesystem.dir mkdir /lib/modules
|
|
|
|
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
|
|
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
|
|
|
mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf"
|
|
umount "binary/boot/filesystem.dir/proc"
|
|
umount "binary/boot/filesystem.dir/sys"
|
|
umount "binary/boot/filesystem.dir/dev/pts"
|
|
umount "binary/boot/filesystem.dir/dev"
|
|
umount "binary/boot/filesystem.dir/tmp"
|