Renaming script names: grub2-.* to grub-.*, including grub.cfg for update-kernel-signature

This commit is contained in:
2019-12-11 19:49:09 +01:00
parent 99a860266a
commit 271c8677d8
5 changed files with 23 additions and 16 deletions

View File

@ -0,0 +1,33 @@
#!/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
if gpg --detach-sign "/boot/grub/grub.cfg"
then
echo /boot/grub/grub.cfg signed.
else
return 1
fi
return 0
}
rm /boot/*.sig
rm /boot/grub/grub.cfg.sig
if ! sign
then
sign
fi