A new user interface for you! Read more...

File lsinitrd of Package cadameb

#!/bin/bash
#
# lsinitrd - show contents of an initrd image
#
# Copyright (C) 2008 SuSE Linux Products GmbH, Nuernberg, Germany
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
# USA.

# This file is kept in the following git repository:
#
# git://git.opensuse.org/projects/mkinitrd.git
#

usage() {
    echo "Usage: lsinitrd [-l] [-h] <initrd>"
}

while [ "$1" ] ; do
    case $1 in
     	-l|--long)
	    verbose=1
	    shift
	    ;;
	-h)
	    usage
	    exit 1
	    ;;
	-*)
	    echo "Unknown option $1"
	    usage
	    exit 1
	    ;;
	*)
	    break;
	    ;;
    esac
done

initrd=$1

if [ -z "$initrd" ] ; then
    echo "No initrd file specified"
    usage
    exit 1
fi

if [ "$verbose" ] ; then
    args="-tv"
else
    args="-t"
fi

zcat $initrd | cpio $args