#!/bin/sh set -e set -x if [ $(id -u) -ne 0 ] ; then echo "You must be root" exit 1; fi if [ -z "$1" ] ; then echo "Usage: $0 \$version" echo "Will place currently installed kernel \$version in the current directory" exit 1; fi version="$1"; shift tar -C / -cvf - \ "/usr/lib/modules/$version" \ "/boot/config-$version" \ "/boot/vmlinuz-$version" \ "/boot/System.map-${version}" \ "/boot/initramfs-${version}.img" \ | gzip -3c > $version.tar.gz