initramfs-tools: make KEYMAP option really work, remove lsinitramfs.

This commit is contained in:
Juan RP 2011-05-25 11:20:43 +02:00
parent 40b6f638a2
commit 2916d616a9
4 changed files with 11 additions and 110 deletions

View File

@ -21,23 +21,23 @@ if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then
fi
# Step 1 - Basic tools
if [ ! -x /bin/loadkeys ] || [ ! -r /etc/console/boottime.kmap.gz ]; then
if [ ! -x /sbin/loadkeys -a ! -r /lib/rc/console/keymap ]; then
exit 0
fi
. /usr/share/initramfs-tools/hook-functions
copy_exec /bin/loadkeys /bin
cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
copy_exec /sbin/loadkeys /sbin
cp /lib/rc/console/keymap ${DESTDIR}/etc/boottime.kmap
gzip -9 ${DESTDIR}/etc/boottime.kmap
# Step 2 - Check for UTF8 console
if [ ! -x /usr/bin/kbd_mode ]; then
if [ ! -x /sbin/kbd_mode ]; then
exit 0
fi
if [ -r /etc/environment ]; then
env="/etc/environment"
elif [ -r /etc/default/locale ]; then
env="/etc/default/locale"
if [ -r /etc/profile.d/locale ]; then
env="/etc/profile.d/locale"
else
exit 0
fi
@ -49,7 +49,7 @@ done
charmap=$(LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap)
if [ "$charmap" = "UTF-8" ]; then
copy_exec /usr/bin/kbd_mode /bin
copy_exec /sbin/kbd_mode /sbin
fi
exit 0
exit 0

View File

@ -1,51 +0,0 @@
#!/bin/sh
set -eu
usage()
{
echo "Usage: $(basename $0) <initramfs file>"
}
if [ "$#" -eq 0 ] ; then
usage >&2
exit 1
fi
cpio_args="--extract --quiet --list"
OPTIONS=`getopt -o hl --long help,long -n "$0" -- "$@"`
# Check for non-GNU getopt
if [ $? != 0 ] ; then echo "W: non-GNU getopt" >&2 ; exit 1 ; fi
eval set -- "$OPTIONS"
while true; do
case "$1" in
-h|--help)
usage
exit 0
;;
-l|--long)
cpio_args="${cpio_args:+${cpio_args} --verbose}"
shift
;;
--)
shift
break
;;
*)
echo "Internal error!" >&2
exit 1
esac
done
for initramfs in "$@" ; do
if ! [ -r "${initramfs}" ] ; then
echo "Specified file could not be read." >&2
exit 1
else
echo "${initramfs}"
zcat "${initramfs}" | cpio ${cpio_args}
fi
done

View File

@ -1,47 +0,0 @@
.TH LSINITRAMFS 8 "2010/06/16" "Linux" "lsinitramfs manual"
.SH NAME
lsinitramfs \- list content of an initramfs image
.SH SYNOPSIS
.B lsinitramfs
.RI [ options ] " <initramfsfile> " [ <initramfsfile> ]
.br
.SH DESCRIPTION
The
.B lsinitramfs
command lists the content of given initramfs images. It allows to quickly check
the content of one (or multiple) specified initramfs files.
.SH OPTIONS
.TP
.B -h
Display usage information and exit.
.TP
.B -l
Display long and more verbose listing of initramfs content.
.SH USAGE EXAMPLES
List initramfs content of current running kernel:
.PP
.B lsinitramfs /boot/initrd.img-$(uname -r)
List content of two initramfs files in verbose mode:
.PP
.B lsinitramfs -l /boot/vmlinuz-2.6.31-grml64 /boot/vmlinuz-2.6.33-grml64
.SH AUTHOR
The initramfs-tools are written by Maximilian Attems <maks@debian.org>
and numerous others.
.SH SEE ALSO
.BR
.IR initramfs-tools (8),
.IR mkinitramfs (8),
.IR update-initramfs (8).

View File

@ -1,6 +1,6 @@
# Template file for 'initramfs-tools'
pkgname=initramfs-tools
_localver=0.99.12 # This is the XBPS version
_localver=0.99.13 # This is the XBPS version
_distver=0.98.8 # This should match debian version
version=${_localver}.${_distver}
build_style=custom-install
@ -95,7 +95,6 @@ do_install()
# Scripts
install -m 755 $FILESDIR/mkinitramfs $DESTDIR/usr/sbin
install -m 755 $FILESDIR/update-initramfs $DESTDIR/usr/sbin
install -m 755 $FILESDIR/lsinitramfs $DESTDIR/usr/sbin
sed -i -e "s|@VERSION@|${version}|g" $DESTDIR/usr/sbin/update-initramfs
# bash_completion.d