2015-03-16 20:38:36 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# grub2-unsign
|
|
|
|
# Unsigns every file in /boot. Depends on grub2-verify
|
|
|
|
# Author: Bandie Kojote
|
|
|
|
# Licence: GNU-GPLv3
|
|
|
|
|
2015-03-17 07:23:23 +01:00
|
|
|
# Check if something is wrong
|
2015-12-30 15:32:46 -06:00
|
|
|
if ! grub2-verify; then
|
|
|
|
printf '%s\n' "grub2-verify has detected a one or more bad signatures." "Please check for malicious software before you're unsigning everything!" >&2
|
2015-03-16 20:38:36 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
2015-03-17 07:23:23 +01:00
|
|
|
|
|
|
|
# Then remove the signatures.
|
2015-12-29 21:26:53 +01:00
|
|
|
find /boot -name '*.sig' -exec rm -- '{}' +
|
|
|
|
|
2015-03-17 07:23:23 +01:00
|
|
|
echo "GRUB2 unsigned. WARNING: If you want to deactivate GRUB2's signature feature, change the check_signatures variable in the headers file!"
|
2015-03-17 07:54:03 +01:00
|
|
|
exit 0
|