Skip to content

Commit

Permalink
fix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
aafeijoo-suse authored and johannbg committed Mar 30, 2022
1 parent 0ef40d8 commit 4688695
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dracut-initramfs-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4688695

Please sign in to comment.