aboutsummaryrefslogtreecommitdiffstats
path: root/arch_install-UEFI.sh
diff options
context:
space:
mode:
authorRudy Bousset <bousset.rudy@gmail.com>2019-08-31 15:07:15 +0200
committerRudy Bousset <bousset.rudy@gmail.com>2019-08-31 15:07:15 +0200
commit9f9e6676943b7977350b302ee77676ed11b5e3a0 (patch)
treecd72b81f5ba5e2bf11d1556f72264cb0123af661 /arch_install-UEFI.sh
parentwork in progress (diff)
downloadarch-installer-9f9e6676943b7977350b302ee77676ed11b5e3a0.tar.gz
arch-installer-9f9e6676943b7977350b302ee77676ed11b5e3a0.tar.bz2
arch-installer-9f9e6676943b7977350b302ee77676ed11b5e3a0.tar.xz
arch-installer-9f9e6676943b7977350b302ee77676ed11b5e3a0.tar.zst
arch-installer-9f9e6676943b7977350b302ee77676ed11b5e3a0.zip
Added some error cases
Diffstat (limited to '')
-rwxr-xr-xarch_install-UEFI.sh52
1 files changed, 48 insertions, 4 deletions
diff --git a/arch_install-UEFI.sh b/arch_install-UEFI.sh
index e899de0..e74c824 100755
--- a/arch_install-UEFI.sh
+++ b/arch_install-UEFI.sh
@@ -7,10 +7,56 @@ echo "# Welcome to Joe's #"
echo "# ARCH LINUX #"
echo "# UEFI INSTALL SCRIPT #"
echo "# #"
-echo "# (press any key to begin...) #"
+echo "# (press [return] to begin...) #"
echo "# #"
echo "#=================================#"
read
+if [ ! -r /sys/firmware/efi/efivars ]; then
+ clear
+ echo "X=X=X=X=X=X=X ERROR X=X=X=X=X=X=X=X"
+ echo "X X"
+ echo "X It seems that boot mode X"
+ echo "X is not set to UEFI X"
+ echo "X therefore Joe's script is X"
+ echo "X forced to abort X"
+ echo "X X"
+ echo "X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X"
+ sleep 6
+ echo && echo
+ echo "Thank you for using Joe's Arch Linux UEFI install scritpt."
+ sleep 1
+ echo "Aborting..."
+ sleep 3
+ clear
+ exit
+fi
+clear
+echo "Verifying your are connected to the Internet, please wait..."
+wget -q --spider https://google.com
+if [ ! $? -eq 0 ]; then
+ clear
+ echo "X=X=X=X=X=X=X ERROR X=X=X=X=X=X=X=X"
+ echo "X X"
+ echo "X It seems that your X"
+ echo "X terminal is not X"
+ echo "X connected to the Internet X"
+ echo "X therefore Joe's script is X"
+ echo "X forced to abort X"
+ echo "X X"
+ echo "X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X"
+ sleep 6
+ echo && echo
+ echo "Thank you for using Joe's Arch Linux UEFI install script."
+ sleep 1
+ echo "Aborting..."
+ sleep 3
+ clear
+ exit
+else
+ echo "Success!"
+ echo "Press [retrun] key to continue"
+ read
+fi
clear
echo "#========= I. DISK SETUP =========#"
echo "# #"
@@ -61,9 +107,7 @@ echo && echo
echo "Is that correct?"
echo "~> [y/n]"
read answr
-if [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes ]]; then
- echo "Thank you for using Joe's Arch Linux UEFI install scritpt."
- sleep 1
+if [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr != YES ]]; then
echo "Aborting..."
sleep 3
clear