Skip to content

Commit

Permalink
Exclude uncomp from layer check
Browse files Browse the repository at this point in the history
  • Loading branch information
antonym committed Dec 26, 2024
1 parent aa91ebe commit 2828127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if [[ "${EXTRACT_INITRD}" == "true" ]] && [[ "${INITRD_TYPE}" != "lz4" ]];then
do
# strip microcode from initrd if it has it
LAYERCOUNT=$(cat ${INITRD_NAME} | cpio -tdmv 2>&1 >/dev/null | wc -c)
if [[ ${LAYERCOUNT} -lt 5000 ]];then
if [[ ${LAYERCOUNT} -lt 5000 ]] && [[ "${INITRD_TYPE}" != "uncomp" ]];then
# This is a microcode cpio wrapper
BLOCKCOUNT=$(cat ${INITRD_NAME} | cpio -tdmv 2>&1 >/dev/null | awk 'END{print $1}')
dd if=${INITRD_NAME} of=${INITRD_NAME}${COUNTER} bs=512 skip=${BLOCKCOUNT}
Expand All @@ -109,7 +109,7 @@ if [[ "${EXTRACT_INITRD}" == "true" ]] && [[ "${INITRD_TYPE}" != "lz4" ]];then
elif [[ "${INITRD_TYPE}" == "gz" ]];then
zcat ../${INITRD_NAME} | cpio -i -d
elif [[ "${INITRD_TYPE}" == "uncomp" ]];then
cat ../${INITRD_NAME} | cpio -idmv --quiet
cat ../${INITRD_NAME} | cpio -i -d
fi
break
fi
Expand Down

0 comments on commit 2828127

Please sign in to comment.