summaryrefslogtreecommitdiff
path: root/lsinitramfs
diff options
context:
space:
mode:
authorMichael Prokop <mika@debian.org>2011-05-16 16:02:59 +0200
committerMichael Prokop <mika@debian.org>2011-05-16 19:11:06 +0200
commit16280bb1c09c10c527dae45b7b656224541d1342 (patch)
tree15f83d842966a867b3d8b4942b99251ae2abd3c4 /lsinitramfs
parent5f37a31d34bcf2e9548d58769d0b1eefcf2354e3 (diff)
lsinitramfs: support xz/lzma, bzip2 and lzop as compress methods.
Closes: #586381 Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michael Prokop <mika@debian.org>
Diffstat (limited to 'lsinitramfs')
-rwxr-xr-xlsinitramfs11
1 files changed, 10 insertions, 1 deletions
diff --git a/lsinitramfs b/lsinitramfs
index 91c65e1..f4e78c1 100755
--- a/lsinitramfs
+++ b/lsinitramfs
@@ -46,6 +46,15 @@ for initramfs in "$@" ; do
exit 1
else
echo "${initramfs}"
- zcat "${initramfs}" | cpio ${cpio_args}
+ if zcat -t "${initramfs}" >/dev/null 2>&1 ; then
+ zcat "${initramfs}" | cpio ${cpio_args}
+ elif xzcat -t "$initramfs" >/dev/null 2>&1 ; then
+ xzcat "$initramfs" | cpio ${cpio_args}
+ elif bzip2 -t "$initramfs" >/dev/null 2>&1 ; then
+ bzip2 -c -d "$initramfs" | cpio ${cpio_args}
+ elif lzop -t "$initramfs" >/dev/null 2>&1 ; then
+ lzop -c -d "$initramfs" | cpio ${cpio_args}
fi
+
+ fi
done