From d65bfb3ceeac973390dc07206df66940871f7a57 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Tue, 10 Aug 2021 10:08:34 -0300 Subject: [PATCH] Fix BIOS crashing --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2cbe7fd..4ba8165 100755 --- a/install.sh +++ b/install.sh @@ -14,6 +14,12 @@ quiet() { DUMMY=$($@ 2>&1 > /dev/null) } +testif() { + set +e + quiet $@ + set -e +} + ### FORCE ROOT ### [ $(whoami) != "root" ] && echo "Please run as root" && exit 1 @@ -50,7 +56,7 @@ echo -e "$AVAILABLE_PLATFORMS" ### SYSTEM ### DISTRO=$(cat /etc/os-release | sed -nE 's/^ID=(.*)/\1/p') INIT_SYS=$(basename $(readlink /bin/init)) -quiet ls /sys/firmware/efi/efivars +testif ls /sys/firmware/efi/efivars [ $? -eq 0 ] && UEFI=1 || UEFI=0 readonly DISTRO readonly INIT_SYS