husy394 / rpms / kernel

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