3 Commits
0.1.1 ... 0.1.3

Author SHA1 Message Date
99a860266a Fallthrough fix 2019-02-17 10:13:22 +01:00
dbb133b8f8 Version 0.1.2 2018-08-05 21:57:48 +02:00
5b2eece33b Fixing Version 2018-08-05 21:56:19 +02:00
2 changed files with 12 additions and 14 deletions

View File

@ -21,7 +21,7 @@ You need
### From github ### From github
- Import [Bandie's GPG key](https://bandie.org/assets/bandie.pub.asc) through running `gpg --recv-keys E2D7876915312785DC086BFCC1E133BC65A822DD`. - Import [Bandie's GPG key](https://bandie.org/assets/bandie.pub.asc) through running `gpg --recv-keys E2D7876915312785DC086BFCC1E133BC65A822DD`.
- Download the [grub2-signing-extension](https://github.com/Bandie/grub2-signing-extension/releases/download/0.1/grub2-signing-extension-0.1.1.tar.gz) and it's [signature](https://github.com/Bandie/grub2-signing-extension/releases/download/0.1/grub2-signing-extension-0.1.1.tar.gz.asc). - Download the [grub2-signing-extension](https://github.com/Bandie/grub2-signing-extension/releases/download/0.1.2/grub2-signing-extension-0.1.2.tar.gz) and it's [signature](https://github.com/Bandie/grub2-signing-extension/releases/download/0.1.2/grub2-signing-extension-0.1.2.tar.gz.asc).
- Run `gpg --verify grub2-signing-extension*.tar.gz.asc` to make sure that everything is alright. - Run `gpg --verify grub2-signing-extension*.tar.gz.asc` to make sure that everything is alright.
- Unpack the tar archive. `tar xvf grub2-signing-extension*.tar.gz` - Unpack the tar archive. `tar xvf grub2-signing-extension*.tar.gz`
- Change into the grub2-signing-extension directory. - Change into the grub2-signing-extension directory.

View File

@ -7,28 +7,26 @@
# Check if something is wrong # Check if something is wrong
grub2-verify grub2-verify
stat=$? stat=$?
if (( $stat == 1 )) case "$stat" in
then 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 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 exit 1
elif (( $stat == 2 )) ;;
then 2)
printf 'Everything is unsigned already.\n' printf 'Everything is unsigned already.\n'
exit 0 exit 0
elif (( $stat == 3 )) ;;
then 3)
printf 'Ignoring missing signatures...\n' printf 'Ignoring missing signatures...\n'
elif (( $stat == 0 )) ;&
then 0|3)
# Then remove the signatures. # Then remove the signatures.
find /boot -name '*.sig' -exec rm {} + 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!" echo "GRUB2 unsigned. WARNING: If you want to deactivate GRUB2's signature feature, change the check_signatures variable in the headers file!"
exit 0 exit 0
;;
else *)
printf 'Something unknown happened!\n' printf 'Something unknown happened!\n'
exit 99 exit 99
fi esac