mirror of
https://github.com/Bandie/grub2-signing-extension.git
synced 2024-04-01 15:51:26 +00:00
Fallthrough fix
This commit is contained in:
parent
dbb133b8f8
commit
99a860266a
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user