PortValhalla/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/sign-modules.sh

16 lines
331 B
Bash
Executable file

#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
else
keyDir="/var/lib/shim-signed/mok";
keyFile="$keyDir/MOK.priv";
pubFile="$keyDir/MOK.der";
for file in $(find /lib/modules /var/lib/dkms -name *.ko);
do
kmodsign sha512 "$keyFile" "$pubFile" "$file";
done
fi