mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-19 13:31:28 +02:00
Merge pull request #2766 from flatcar/ader1990/fix-rootfs-6kernel-10
cpio: do not fail on ghost rootfs
This commit is contained in:
commit
ad497156dc
@ -81,11 +81,9 @@ perform_round() {
|
|||||||
for rnd in "${round_prefix}"*; do
|
for rnd in "${round_prefix}"*; do
|
||||||
if [[ $(file --brief "${rnd}") =~ 'cpio archive' ]]; then
|
if [[ $(file --brief "${rnd}") =~ 'cpio archive' ]]; then
|
||||||
mkdir -p "${out}/rootfs-${ROOTFS_IDX}"
|
mkdir -p "${out}/rootfs-${ROOTFS_IDX}"
|
||||||
while cpio --quiet --extract --make-directories --directory="${out}/rootfs-${ROOTFS_IDX}" --nonmatching 'dev/*'; do
|
# On Linux 6.10, the first rootfs is an extra ghost rootfs of 336K, that has a corrupted CPIO
|
||||||
|
cpio --quiet --extract --make-directories --directory="${out}/rootfs-${ROOTFS_IDX}" --nonmatching 'dev/*' < $rnd || true
|
||||||
ROOTFS_IDX=$(( ROOTFS_IDX + 1 ))
|
ROOTFS_IDX=$(( ROOTFS_IDX + 1 ))
|
||||||
mkdir -p "${out}/rootfs-${ROOTFS_IDX}"
|
|
||||||
done <${rnd}
|
|
||||||
rmdir "${out}/rootfs-${ROOTFS_IDX}"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user