summaryrefslogtreecommitdiff
path: root/lsinitramfs
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-06-16 17:12:53 +0200
committermaximilian attems <maks@debian.org>2010-06-17 13:59:38 +0200
commita39db63500c4482aad7d2fc17ad83edd3a56bb8f (patch)
tree4c506005eeb464dd389ef88ca94c8508b6c07c13 /lsinitramfs
parent20313797a36d115827f1060cffe48255852a387f (diff)
downloadinitramfs-tools-a39db63500c4482aad7d2fc17ad83edd3a56bb8f.tar.gz
initramfs-tools-a39db63500c4482aad7d2fc17ad83edd3a56bb8f.zip
Add lsinitramfs to initramfs-tools
useful script to quickly look into initramfs for debugger or bug reporter, inspired by similar dracut tool. Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'lsinitramfs')
-rwxr-xr-xlsinitramfs14
1 files changed, 14 insertions, 0 deletions
diff --git a/lsinitramfs b/lsinitramfs
new file mode 100755
index 0000000..aea7747
--- /dev/null
+++ b/lsinitramfs
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+usage()
+{
+ echo "Usage: $(basename $0) <initramfs file>"
+ exit 1
+}
+
+[ $# -eq 0 ] && usage
+
+for i in $*; do
+ echo $i
+ zcat $i | cpio --extract --verbose --quiet --list
+done