Using gpg's passphrase request; new script.

This commit is contained in:
Bandie Canis
2018-01-12 21:46:55 +01:00
parent ea444b288b
commit 1b49b45439
6 changed files with 54 additions and 39 deletions

View File

@ -0,0 +1,26 @@
#!/bin/bash
# grub2-update-kernel-signature
# Renews the signature in /boot/.
# Author: Bandie
# Licence: GNU-GPLv3
function sign(){
for f in `find /boot -maxdepth 1 -type f`
do
if gpg --detach-sign $f
then
echo $f signed.
else
return 1
fi
done
return 0
}
rm /boot/*.sig
if ! sign
then
sign
fi