Last active
March 23, 2019 23:42
-
-
Save pedropombeiro/b9bd3a87d72a7e9c3df3ee6809762610 to your computer and use it in GitHub Desktop.
Sign vbox modules (/root/module-signing/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function signModule() { | |
modfile=$1 | |
signScript="/usr/src/linux-headers-$(uname -r)/scripts/sign-file" | |
echo "Signing $modfile" | |
if [ ! -f $signScript ]; then | |
echo "Could not find $signScript, exiting" | |
exit 1 | |
fi | |
$signScript sha256 \ | |
/root/module-signing/MOK.priv \ | |
/root/module-signing/MOK.der "$modfile" | |
} | |
for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do | |
echo "Signing $modfile" | |
signModule "$modfile" | |
done | |
signModule "$(modinfo -n vmmon)" | |
signModule "$(modinfo -n vmnet)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment