dingjian / rpms / kernel-rt

Forked from rpms/kernel-rt 4 years ago
Clone

Blame SOURCES/generate_bls_conf.sh

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