Add UEFI check; modify check loop

This commit is contained in:
maride 2017-07-30 22:51:32 +02:00
parent 99dbb4ab20
commit f1ba4f6ecb
3 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
ping -c 1 archlinux.org 2>/tmp/arch-maride-flavour_checks_error.log 1>/tmp/arch-maride-flavour_checks_out.log
ping -c 1 archlinux.org 2>/tmp/arch-maride-flavour_checks_internet_error.log 1>/tmp/arch-maride-flavour_checks_internet_out.log
return=$?
if [ "$return" -eq 0 ]; then

11
checks/uefi.check Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log
return=$?
if [ "$return" -eq 0 ]; then
exit 0
else
echo "~> This doesn't seem to be an UEFI boot. Please boot UEFI."
exit 1
fi

View File

@ -19,8 +19,9 @@ fi
for check in checks/*.check
do
echo "=> Running check '$check'..."
. $check
if [ "$?" -eq 0 ]; then
$($check)
return=$?
if [ "$return" -ne 0 ]; then
echo "=> Check failed. Fix it, maybe."
exit
fi