3 # this was the initial rough implementation of what became kvariant.sh
4 # should maybe be deprecated..
20 program=$(basename $0)
22 echo " $program kernel.rpm"
23 echo " where kernel.rpm is the corresponding rpm files,"
24 echo " which might live in ./RPMS/..."
31 if [ -f "$filename" ] ; then
32 if [ $(rpm -qip $filename | wc -l) -eq 1 ] ; then
33 echo "$filename not a valid rpm file"
39 [ -z "$kernelrpm" ] && usage
42 tmpdir=$(mktemp -d /var/tmp/bootcd.XXXXXX)
44 echo "Updating bootcd image with $kernelrpm"
48 gzip -d -c $isofsdir/bootcd.img | cpio -diu
51 rpm2cpio $kernelrpm | cpio -diu
52 version=$(cd ./boot && ls vmlinuz* | sed 's,vmlinuz-,,')
54 cp boot/vmlinuz* ${tmpdir}/kernel
55 find . | cpio --quiet -c -o | gzip -9 > ${tmpdir}/bootcd.img
60 mv ${isofsdir}/kernel ${tmpdir}/kernel.orig
61 mv ${isofsdir}/bootcd.img ${tmpdir}/bootcd.img.orig
64 mv ${tmpdir}/kernel ${isofsdir}/kernel
65 mv ${tmpdir}/bootcd.img ${isofsdir}/bootcd.img