Updating sha1sum for recompressed initrd images (Closes: #745205).
authorDaniel Baumann <mail@daniel-baumann.ch>
Fri, 25 Apr 2014 19:28:12 +0000 (21:28 +0200)
committerDaniel Baumann <mail@daniel-baumann.ch>
Sat, 26 Apr 2014 06:05:32 +0000 (08:05 +0200)
scripts/build/chroot_hacks

index 50f43cb..bdd7d64 100755 (executable)
@@ -90,6 +90,7 @@ case "${LB_INITRAMFS_COMPRESSION}" in
                for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
                        zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new"
                        mv "${INITRAMFS}.new" "${INITRAMFS}"
+                       echo "$(sha1sum ${INITRAMFS} | awk '{ print $1 }')  /boot/$(basename ${INITRAMFS})" > chroot/var/lib/initramfs-tools/$(basename ${INITRAMFS} | sed -e 's|initrd.img-||')
                done
                ;;
 
@@ -97,6 +98,7 @@ case "${LB_INITRAMFS_COMPRESSION}" in
                for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
                        zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new"
                        mv "${INITRAMFS}.new" "${INITRAMFS}"
+                       echo "$(sha1sum ${INITRAMFS} | awk '{ print $1 }')  /boot/$(basename ${INITRAMFS})" > chroot/var/lib/initramfs-tools/$(basename ${INITRAMFS} | sed -e 's|initrd.img-||')
                done
                ;;
 esac