Fixing exit code error

This commit is contained in:
Bandie 2018-04-08 14:46:43 +02:00
parent ed07f8de05
commit e9b48b71a8
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD
2 changed files with 14 additions and 10 deletions

View File

@ -18,13 +18,17 @@ then
elif (( $stat == 3 )) elif (( $stat == 3 ))
then then
printf 'Ignoring missing signatures...\n' printf 'Ignoring missing signatures...\n'
else elif (( $stat == 0 ))
printf 'Something unknown happened!\n' then
exit 99
fi
# 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'
exit 99
fi

View File

@ -87,11 +87,11 @@ fi
if (( ${#error_files[@]} > 0 )) if (( ${#error_files[@]} > 0 ))
then then
exit 1 exit 1
elif (( ${#missing_files[@]} > 0 ))
then
exit 3
else
exit 0
fi fi
exit 99 if (( ${#missing_files[@]} > 0 ))
then
exit 3
fi
exit 0