dingjian / rpms / kernel-rt

Forked from rpms/kernel-rt 4 years ago
Clone

Blame SOURCES/generate_bls_conf.sh

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