Browse Source

create script 09.05.23

root 1 year ago
commit
c921a1bb4b
2 changed files with 12 additions and 0 deletions
  1. 0 0
      READMI.md
  2. 12 0
      src/module-reg4uefi

+ 0 - 0
READMI.md


+ 12 - 0
src/module-reg4uefi

@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+# script enable nvidia module from UEFI
3
+opt=$1
4
+
5
+path_script="$(dirname $(readlink --canonicalize-existing "$0"))"
6
+openssl req -new -x509 -newkey rsa:2048 -keyout $pash_script/MOK.priv -outform DER -out $pash_script/MOK.der -nodes -days 36500 -subj "/CN=YOUR_NAME/"
7
+for modfile in $(find /* -type f --name $opt -printf '%f\n'); do
8
+  echo "Signing $modfile"
9
+  /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 \
10
+                                $path_script/MOK.priv \
11
+                                $path_script/MOK.der "$modfile"
12
+done