kernel/generate_bls_conf.sh
Javier Martinez Canillas fbedc324c5
Drop the id field from generated BLS snippets
The id field was used to sort the menu entries and to be used as the menu
entries id. But now the BLS filename is used for that, so drop this field.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-07-12 12:58:27 -04:00

31 lines
612 B
Bash
Executable File

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