mirror of
https://github.com/Bandie/grub2-signing-extension.git
synced 2024-04-01 15:51:26 +00:00
21 lines
576 B
Bash
21 lines
576 B
Bash
#!/bin/bash
|
|
# grub2-unsign
|
|
# Unsigns every file in /boot. Depends on grub2-verify
|
|
# Author: Bandie Kojote
|
|
# Licence: GNU-GPLv3
|
|
|
|
# Check if something is wrong
|
|
grub2-verify
|
|
if [ $? -eq 1 ]
|
|
then
|
|
echo -e "grub2-verify has detected a one or more bad signatures.\nPlease check for malicious software before you're unsigning everything!"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# 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
|