fix(dracut-initramfs-restore.sh): add missing compression options

The unpack fails if the initrd is not compressed or compressed with
bzip2 or LZO.

Fix issue #1463
master
Antonio Alvarez Feijoo 2022-01-24 16:38:45 +01:00 committed by Jóhann B. Guðmundsson
parent 7ab1d00227
commit e86397de24
1 changed files with 7 additions and 7 deletions

View File

@ -51,13 +51,13 @@ fi


cd /run/initramfs cd /run/initramfs


if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then if $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null \
rm -f -- .need_shutdown || $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then || $SKIP "$IMG" | bzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
rm -f -- .need_shutdown || $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then || $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \
rm -f -- .need_shutdown || $SKIP "$IMG" | lzop -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \
elif $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then || $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown rm -f -- .need_shutdown
else else
# something failed, so we clean up # something failed, so we clean up