Skip to content

Commit e86397d

Browse files
aafeijoo-susejohannbg
authored andcommitted
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
1 parent 7ab1d00 commit e86397d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: dracut-initramfs-restore.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ fi
5151

5252
cd /run/initramfs
5353

54-
if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
55-
rm -f -- .need_shutdown
56-
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
57-
rm -f -- .need_shutdown
58-
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
59-
rm -f -- .need_shutdown
60-
elif $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
54+
if $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null \
55+
|| $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
56+
|| $SKIP "$IMG" | bzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
57+
|| $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \
58+
|| $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \
59+
|| $SKIP "$IMG" | lzop -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \
60+
|| $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
6161
rm -f -- .need_shutdown
6262
else
6363
# something failed, so we clean up

0 commit comments

Comments
 (0)