neue namensgebung

This commit is contained in:
Jakobus Schürz 2019-07-17 23:19:05 +02:00
parent 62c7e2a4a3
commit 97eb98317b
2 changed files with 1 additions and 39 deletions

View file

@ -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 <modulename> [<modulename>] [<modulename>]...
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

View file

@ -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