Add checksum generation support
DIB_CHECKSUM is set by the disk-image-create --checksum flag, and for other images results in checksum files being generated for the image[1]. This change ensures checksum files are generated for built ramdisk/kernel as well. [1] https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/lib/common-functions#L68 Change-Id: I6128fbad5d9db2ea6469f196f3ee13b6fab76837
This commit is contained in:
parent
1949d5c09b
commit
59d79f6ccd
@ -86,5 +86,11 @@ fi
|
||||
select_boot_kernel_initrd $TARGET_ROOT
|
||||
sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel
|
||||
sudo chown $USER: ${IMAGE_PATH}.kernel
|
||||
if [ "$DIB_CHECKSUM" == "1" ]; then
|
||||
pushd $(dirname ${IMAGE_PATH})
|
||||
md5sum ${IMAGE_NAME}.initramfs ${IMAGE_NAME}.kernel > ${IMAGE_NAME}.md5
|
||||
sha256sum ${IMAGE_NAME}.initramfs ${IMAGE_NAME}.kernel > ${IMAGE_NAME}.sha256
|
||||
popd
|
||||
fi
|
||||
# Output image sizes for debugging
|
||||
sudo ls -lh ${IMAGE_PATH}.*
|
||||
|
1
dib/ironic-ramdisk-base/environment.d/10-checksum.bash
Normal file
1
dib/ironic-ramdisk-base/environment.d/10-checksum.bash
Normal file
@ -0,0 +1 @@
|
||||
export DIB_CHECKSUM=${DIB_CHECKSUM:-0}
|
Loading…
Reference in New Issue
Block a user