livecd-rootfs/live-build/ubuntu-cpc/hooks/030-root-tarball.binary
Daniel Watkins 131941df22 Import patches-unapplied version 2.352 to ubuntu/xenial-proposed
Imported using git-ubuntu import.

Changelog parent: 9ac850741cb5c111949cb40b971436c3524d495d

New changelog entries:
  * Move building of all architecture-specific CPC artifacts into Launchpad
    (LP: #1513754).
2015-11-06 10:24:18 +00:00

26 lines
1.1 KiB
Bash
Executable File

#!/bin/bash -ex
mkdir binary/boot/filesystem.dir
cp -a chroot/* binary/boot/filesystem.dir
mount --bind /dev "binary/boot/filesystem.dir/dev"
mount proc-live -t proc "binary/boot/filesystem.dir/proc"
mount sysfs-live -t sysfs "binary/boot/filesystem.dir/sys"
mv "binary/boot/filesystem.dir/etc/resolv.conf" resolv.conf.tmp
cp /etc/resolv.conf "binary/boot/filesystem.dir/etc/resolv.conf"
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-.*'
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"