summaryrefslogtreecommitdiff
path: root/SOURCES/generate_bls_conf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCES/generate_bls_conf.sh')
-rwxr-xr-xSOURCES/generate_bls_conf.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/SOURCES/generate_bls_conf.sh b/SOURCES/generate_bls_conf.sh
new file mode 100755
index 0000000..fc3f0e8
--- /dev/null
+++ b/SOURCES/generate_bls_conf.sh
@@ -0,0 +1,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