platforms/{livecd,livedvd,testcd}: exit with error if boot kernel and initramfs images are not copied correctly

This commit is contained in:
Silvan Calarco 2021-06-29 11:34:10 +02:00
parent f67c314f75
commit 6e690e54ce
3 changed files with 18 additions and 9 deletions

View File

@ -19,10 +19,13 @@ for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# Note: isolinux requires 8.3 filenames
cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
$MOUNTDIR2/boot/initrd${ISOID}.gz
$MOUNTDIR2/boot/initrd${ISOID}.gz || {
echo "Error: cannot copy file $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/initrd${ISOID}.gz.";
exit 1; }
cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \
$MOUNTDIR2/boot/vmlinuz${ISOID}
$MOUNTDIR2/boot/vmlinuz${ISOID} || {
echo "Error: cannot copy file $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/vmlinuz${ISOID}.gz.";
exit 1; }
ISOID=$(($ISOID + 1))
done

View File

@ -19,10 +19,13 @@ for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# Note: isolinux requires 8.3 filenames
cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
$MOUNTDIR2/boot/initrd${ISOID}.gz
$MOUNTDIR2/boot/initrd${ISOID}.gz || {
echo "Error: cannot copy file $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/initrd${ISOID}.gz.";
exit 1; }
cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \
$MOUNTDIR2/boot/vmlinuz${ISOID}
$MOUNTDIR2/boot/vmlinuz${ISOID} || {
echo "Error: cannot copy file $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/vmlinuz${ISOID}.gz.";
exit 1; }
ISOID=$(($ISOID + 1))
done

View File

@ -19,10 +19,13 @@ for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# Note: isolinux requires 8.3 filenames
cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
$MOUNTDIR2/boot/initrd${ISOID}.gz
$MOUNTDIR2/boot/initrd${ISOID}.gz || {
echo "Error: cannot copy file $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/initrd${ISOID}.gz.";
exit 1; }
cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \
$MOUNTDIR2/boot/vmlinuz${ISOID}
$MOUNTDIR2/boot/vmlinuz${ISOID} || {
echo "Error: cannot copy file $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K}.img.gz to $MOUNTDIR2/boot/vmlinuz${ISOID}.gz.";
exit 1; }
ISOID=$(($ISOID + 1))
done