From 2916d616a945c306559ea5602c06723af407dcc2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 25 May 2011 11:20:43 +0200 Subject: [PATCH] initramfs-tools: make KEYMAP option really work, remove lsinitramfs. --- srcpkgs/initramfs-tools/files/hooks/keymap | 20 ++++---- srcpkgs/initramfs-tools/files/lsinitramfs | 51 --------------------- srcpkgs/initramfs-tools/files/lsinitramfs.8 | 47 ------------------- srcpkgs/initramfs-tools/template | 3 +- 4 files changed, 11 insertions(+), 110 deletions(-) delete mode 100755 srcpkgs/initramfs-tools/files/lsinitramfs delete mode 100644 srcpkgs/initramfs-tools/files/lsinitramfs.8 diff --git a/srcpkgs/initramfs-tools/files/hooks/keymap b/srcpkgs/initramfs-tools/files/hooks/keymap index a2b1b087a0..b6d715978f 100755 --- a/srcpkgs/initramfs-tools/files/hooks/keymap +++ b/srcpkgs/initramfs-tools/files/hooks/keymap @@ -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 diff --git a/srcpkgs/initramfs-tools/files/lsinitramfs b/srcpkgs/initramfs-tools/files/lsinitramfs deleted file mode 100755 index 91c65e1d14..0000000000 --- a/srcpkgs/initramfs-tools/files/lsinitramfs +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -set -eu - -usage() -{ - echo "Usage: $(basename $0) " -} - -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 diff --git a/srcpkgs/initramfs-tools/files/lsinitramfs.8 b/srcpkgs/initramfs-tools/files/lsinitramfs.8 deleted file mode 100644 index d802c76451..0000000000 --- a/srcpkgs/initramfs-tools/files/lsinitramfs.8 +++ /dev/null @@ -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 ] " " [ ] -.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 -and numerous others. - -.SH SEE ALSO -.BR -.IR initramfs-tools (8), -.IR mkinitramfs (8), -.IR update-initramfs (8). diff --git a/srcpkgs/initramfs-tools/template b/srcpkgs/initramfs-tools/template index d951a8e5dd..a84ec3fbf4 100644 --- a/srcpkgs/initramfs-tools/template +++ b/srcpkgs/initramfs-tools/template @@ -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