Showing 1 changed files with 8 additions and 1 deletions
+8 -1
sign-module
... ...
@@ -1,12 +1,19 @@
1 1
 #!/bin/zsh
2 2
 # bash compatible
3 3
 
4
-for c in nvidia-current vboxdrv; do
4
+declare -A mod
5
+mod[nv]=nvidia-current
6
+mod[vbox]=vboxdrv
7
+mod[default]="${mod[nv]} ${mod[vbox]}"
8
+test -n "$1" && test -z ${mod[$1]} && mod[$1]=${mod[default]}
9
+
10
+for c in ${mod[${1:-default}]}; do
5 11
     for modfile in $(dirname $(modinfo -n $c))/*.ko; do
6 12
         sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file \
7 13
             sha256 \
8 14
             /root/module-signing/MOK.priv \
9 15
             /root/module-signing/MOK.der \
10 16
             "$modfile"
17
+        echo ${modfile##*/}
11 18
     done
12 19
 done