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

32
sbin/grub-unsign Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# grub2-unsign
# Unsigns every file in /boot. Depends on grub2-verify
# Author: Bandie
# Licence: GNU-GPLv3
# Check if something is wrong
grub2-verify
stat=$?
case "$stat" in
1)
printf '%s\n' "grub2-verify has detected a one or more bad signatures." "Please check for malicious software before you're unsigning everything!" >&2
exit 1
;;
2)
printf 'Everything is unsigned already.\n'
exit 0
;;
3)
printf 'Ignoring missing signatures...\n'
;&
0|3)
# Then remove the signatures.
find /boot -name '*.sig' -exec rm {} +
echo "GRUB2 unsigned. WARNING: If you want to deactivate GRUB2's signature feature, change the check_signatures variable in the headers file!"
exit 0
;;
*)
printf 'Something unknown happened!\n'
exit 99
esac