grub2-signing-extension/sbin/grub2-unsign

21 lines
576 B
Plaintext
Raw Normal View History

2015-03-16 19:38:36 +00:00
#!/bin/bash
# grub2-unsign
# Unsigns every file in /boot. Depends on grub2-verify
# Author: Bandie Kojote
# Licence: GNU-GPLv3
2015-03-17 06:23:23 +00:00
# Check if something is wrong
2015-03-16 19:38:36 +00:00
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
2015-03-17 06:23:23 +00:00
# Then remove the signatures.
2015-12-29 20:26:53 +00:00
find /boot -name '*.sig' -exec rm -- '{}' +
2015-03-17 06:23:23 +00:00
echo "GRUB2 unsigned. WARNING: If you want to deactivate GRUB2's signature feature, change the check_signatures variable in the headers file!"
exit 0