add lsinitrd
authorHarald Hoyer <harald@redhat.com>
Thu, 14 Jan 2010 16:20:43 +0000 (17:20 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 14 Jan 2010 16:20:43 +0000 (17:20 +0100)
lsinitrd [new file with mode: 0755]

diff --git a/lsinitrd b/lsinitrd
new file mode 100755 (executable)
index 0000000..4221fa8
--- /dev/null
+++ b/lsinitrd
@@ -0,0 +1,11 @@
+#!/bin/bash 
+
+[[ $# -eq 1 ]] || { echo "Usage: $(basename $0) <initramfs file>" ; exit 1 ; }
+[[ -f $1 ]]    || { echo "$1 does not exist" ; exit 1 ; }
+
+echo "$1:"
+echo "========================================================================"
+zcat $1 | cpio --extract --verbose --quiet --to-stdout 'dracut-*' 2>/dev/null
+echo "========================================================================"
+zcat $1 | cpio --extract --verbose --quiet --list
+echo "========================================================================"