Browse Source

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 2 years ago committed by Jóhann B. Guðmundsson
parent
commit
e86397de24
  1. 14
      dracut-initramfs-restore.sh

14
dracut-initramfs-restore.sh

@ -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

Loading…
Cancel
Save