mirror of
https://github.com/flatcar/scripts.git
synced 2026-03-06 22:11:52 +01:00
cpio: show all the rootfs found
This commit is contained in:
parent
3f2c54b394
commit
b6640b62ac
@ -81,11 +81,9 @@ perform_round() {
|
||||
for rnd in "${round_prefix}"*; do
|
||||
if [[ $(file --brief "${rnd}") =~ 'cpio archive' ]]; then
|
||||
mkdir -p "${out}/rootfs-${ROOTFS_IDX}"
|
||||
while cpio --quiet --extract --make-directories --directory="${out}/rootfs-${ROOTFS_IDX}" --nonmatching 'dev/*'; do
|
||||
ROOTFS_IDX=$(( ROOTFS_IDX + 1 ))
|
||||
mkdir -p "${out}/rootfs-${ROOTFS_IDX}"
|
||||
done <${rnd}
|
||||
rmdir "${out}/rootfs-${ROOTFS_IDX}"
|
||||
# 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 ))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user