~ubuntu-core-dev/livecd-rootfs/bionic-proposed

« back to all changes in this revision

Viewing changes to live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot

  • Committer: Balint Reczey
  • Date: 2019-01-31 08:14:49 UTC
  • Revision ID: balint.reczey@canonical.com-20190131081449-n8ne0p9wd90j5cle
Moved to git at https://git.launchpad.net/livecd-rootfs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
 
3
 
set -ex
4
 
 
5
 
IVER="$(dpkg -s initramfs-tools-ubuntu-core | \
6
 
                        sed -n '/^Version:/{s/^[^: ]*: \([^: ]*\).*/\1/;p;}')"
7
 
 
8
 
# fail the build if we did not find the snappy initrd package
9
 
[ -n "$IVER" ] || exit 1
10
 
 
11
 
# force lzma
12
 
mkdir -p /etc/initramfs-tools/conf.d
13
 
echo "COMPRESS=lzma" >/etc/initramfs-tools/conf.d/snappy-generic-initrd.conf
14
 
 
15
 
update-initramfs.REAL -c -kcore-$IVER -v
16
 
 
17
 
cd /boot
18
 
ln -s initrd.img-core-$IVER initrd.img-core
19
 
cd -
20
 
 
21
 
sha1sum /boot/initrd.img-core >/var/lib/initramfs-tools/core
22
 
 
23
 
# for snapcraft backwards compatibility
24
 
mkdir -p /usr/lib/ubuntu-core-generic-initrd
25
 
cp -a /boot/initrd.img-core* /usr/lib/ubuntu-core-generic-initrd/