mirror of
https://github.com/Bandie/grub2-signing-extension.git
synced 2024-04-01 15:51:26 +00:00
27 lines
336 B
Plaintext
27 lines
336 B
Plaintext
|
#!/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
|