summaryrefslogtreecommitdiff
path: root/SOURCES/generate_bls_conf.sh
blob: fc3f0e830dcdb208cd7f185a3dac842434a1ab5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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