From 97eb98317b6a3b9091171e0cf699eedd2fe9d187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 17 Jul 2019 23:19:05 +0200 Subject: [PATCH] neue namensgebung --- create_module_key.sh | 38 -------------------------------------- sign-modules.sh | 2 +- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100755 create_module_key.sh diff --git a/create_module_key.sh b/create_module_key.sh deleted file mode 100755 index e8702d2..0000000 --- a/create_module_key.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -MOK=modules_signing - -case $1 in - -h) - echo Usage create key-pair: - $0 -c - echo Usage sign modules: - $0 -s [] []... - shift - ;; - -c) - shift - echo create key-pair for signing the modules - - if [ -e $MOK.priv ] ;then - : - else - openssl req -new -x509 -newkey rsa:2048 -keyout $MOK.priv -outform DER -out $MOK.der -nodes -days 36500 -subj "/CN=Jakobus Schuerz/" - fi - sudo mokutil --import $MOK.der - ;; - - - -s) - shift - echo "Sign kernel modules $(uname -r)" - for i in $@; do - echo sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./$MOK.priv ./$MOK.der $(modinfo -n ${i}) - sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./$MOK.priv ./$MOK.der $(modinfo -n ${i}) - done - ;; - *) - echo "wrong option" - exit 1 -esac - diff --git a/sign-modules.sh b/sign-modules.sh index 1291287..ba3561c 100755 --- a/sign-modules.sh +++ b/sign-modules.sh @@ -81,5 +81,5 @@ echo "Sign kernel modules »${MODULES[*]}« for kernel-version ${KVERS}" for i in ${MODULES[*]}; do echo sign $i echo sudo /usr/src/kernels/${KVERS}/scripts/sign-file sha256 ./$MOK.priv ./$MOK.der $(modinfo -n ${i}) - sudo /usr/src/kernels/${KVERS}/scripts/sign-file sha256 ./$MOK.priv ./$MOK.der $(modinfo -n ${i}) + sudo /usr/src/kernels/${KVERS}/scripts/sign-file sha256 ./$MOK.priv ./$MOK.der $(modinfo -k "${KVERS}" -n ${i}) done