livecd-rootfs/live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot
Oliver Grawert 9fadf2c648 Import patches-unapplied version 2.399 to ubuntu/xenial-proposed
Imported using git-ubuntu import.

Changelog parent: 01521cefe4108a2a62c47eb2bdbc978a70f0ed20

New changelog entries:
  [ Oliver Grawert ]
  * live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot:
    kill the snappy os build if the initramfs-tools-ubuntu-core package
    is not found
  * make s390x known to the snappy builds
  * skip kernel snap an device tarball builds for s390x and ppc64el
  * drop listing of the device tarballs, this was only for debugging
  [ Adam Conrad ]
  * live-build/ubuntu-cpc/hooks/032-disk-image.binary: Install s390-tools
    and sysconfig-hardware before we attempt to configure zipl.
2016-04-13 11:59:27 +00:00

26 lines
658 B
Bash
Executable File

#! /bin/sh
set -ex
IVER="$(dpkg -s initramfs-tools-ubuntu-core | \
sed -n '/^Version:/{s/^[^: ]*: \([^: ]*\).*/\1/;p;}')"
# fail the build if we did not find the snappy initrd package
[ -n "$IVER" ] || exit 1
# force lzma
mkdir -p /etc/initramfs-tools/conf.d
echo "COMPRESS=lzma" >/etc/initramfs-tools/conf.d/snappy-generic-initrd.conf
update-initramfs.REAL -c -kcore-$IVER -v
cd /boot
ln -s initrd.img-core-$IVER initrd.img-core
cd -
sha1sum /boot/initrd.img-core >/var/lib/initramfs-tools/core
# for snapcraft backwards compatibility
mkdir -p /usr/lib/ubuntu-core-generic-initrd
cp -a /boot/initrd.img-core* /usr/lib/ubuntu-core-generic-initrd/