From: Antonio Alvarez Feijoo Date: Fri, 18 Mar 2022 14:42:42 +0000 (+0100) Subject: fix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last option X-Git-Tag: 057~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46886956211f8a436e2e9f81fc4972d2a297c3a3;p=thirdparty%2Fdracut.git fix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last option Attempting to unpack the initrd assuming it is uncompressed when it is delays the shutdown process by several seconds. This must be the last check. --- diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh index b19be7de3..68ea3873b 100644 --- a/dracut-initramfs-restore.sh +++ b/dracut-initramfs-restore.sh @@ -51,13 +51,13 @@ fi cd /run/initramfs -if $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null \ - || $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ +if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ || $SKIP "$IMG" | bzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ || $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ || $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \ || $SKIP "$IMG" | lzop -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \ - || $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 \ + || $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null; then rm -f -- .need_shutdown else # something failed, so we clean up