summaryrefslogtreecommitdiff
path: root/SOURCES/generate_bls_conf.sh
diff options
context:
space:
mode:
authorSentry <sentry@Sentry-Desktop-Fedora.local>2020-07-14 15:58:43 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-12-05 19:40:07 +0100
commit391fe055c943e33e9c191dbeeb21995c0d54ccd9 (patch)
tree04bbfbe91a73cc0d47c2d70235c8ca365eaa9c3d /SOURCES/generate_bls_conf.sh
downloadkernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.tar.gz
kernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.zip
kernel 5.7.8
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