kernel/SOURCES/generate_bls_conf.sh

31 lines
619 B
Bash
Raw Normal View History

2021-11-06 14:19:23 +00:00
#!/bin/bash
set -e
. /etc/os-release
kernelver=$1 && shift
rootfs=$1 && shift
variant=$1 && shift
output="${rootfs}/lib/modules/${kernelver}/bls_sample.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