livecd-rootfs/live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot
CloudBuilder e20120480d Imported 2.592
No reason for CPC update specified.
2019-06-05 17:00:04 +00:00

22 lines
530 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
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/