l30013671 / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
af29e1
#!/bin/bash
af29e1
set -e
af29e1
af29e1
. /etc/os-release
af29e1
af29e1
kernelver=$1 && shift
af29e1
rootfs=$1 && shift
af29e1
variant=$1 && shift
af29e1
af29e1
output="${rootfs}/lib/modules/${kernelver}/bls.conf"
af29e1
date=$(date -u +%Y%m%d%H%M%S)
af29e1
af29e1
if [ "${variant:-5}" = "debug" ]; then
af29e1
    debugname=" with debugging"
af29e1
    debugid="-debug"
af29e1
else
af29e1
    debugname=""
af29e1
    debugid=""
af29e1
fi
af29e1
af29e1
cat >${output} <
c6c337
title ${NAME% *} (${kernelver}) ${VERSION}${debugname}
af29e1
version ${kernelver}${debugid}
af29e1
linux ${bootprefix}/vmlinuz-${kernelver}
af29e1
initrd ${bootprefix}/initramfs-${kernelver}.img
af29e1
options \$kernelopts
af29e1
id ${ID}-${date}-${kernelver}${debugid}
af29e1
grub_users \$grub_users
af29e1
grub_arg --unrestricted
af29e1
grub_class kernel${variant}
af29e1
EOF