OSDN Git Service

retry pacman installations
authorpaperbenni <paperbenni@gmail.com>
Tue, 31 Mar 2020 22:42:30 +0000 (00:42 +0200)
committerpaperbenni <paperbenni@gmail.com>
Tue, 31 Mar 2020 22:42:30 +0000 (00:42 +0200)
archinstall.sh
bootloader/bootloader.sh [deleted file]
bootloader/install.sh
depend/depend.sh
depend/system.sh
pacstrap/pacstrap.sh
systeminstall.sh

index 82c59b9..82e3842 100755 (executable)
@@ -8,11 +8,12 @@
 curl -s 'https://raw.githubusercontent.com/instantOS/instantLOGO/master/ascii.txt'
 echo ""
 
-echo "selecting fastest mirror"
 # sort mirrors
 pacman -Sy --noconfirm
 pacman -S reflector --noconfirm
-reflector --sort rate --save /etc/pacman.d/mirrorlist
+
+echo "selecting fastest mirror"
+reflector --latest 20 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
 
 # install dependencies
 pacman -Sy --noconfirm
diff --git a/bootloader/bootloader.sh b/bootloader/bootloader.sh
deleted file mode 100755 (executable)
index 67d372d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-pacman -S grub --noconfirm
\ No newline at end of file
index f50fd7b..153b0c1 100755 (executable)
@@ -1,2 +1,2 @@
 #!/bin/bash
-grub-install --target=i386-pc $(cat /root/instantdisk) --root /mnt
\ No newline at end of file
+grub-install --target=i386-pc "$(cat /root/instantARCH/config/disk)" --root /mnt
index a630b85..2aad8fe 100755 (executable)
@@ -2,10 +2,14 @@
 pacman -Sy --noconfirm
 
 echo "downloading installer dependencies"
-pacman -S --noconfirm --needed \
+
+while ! pacman -S --noconfirm --needed \
     fzf \
     expect \
     git \
     dialog \
     bash \
-    curl
+    curl; do
+    echo "downloading packages failed, please reconnect to internet"
+    sleep 10
+done
index e873203..f9dfe50 100755 (executable)
@@ -3,13 +3,19 @@
 echo "installing additional system software"
 
 pacman -Sy --noconfirm
-pacman -S xorg --noconfirm --needed
 
-pacman -S --noconfirm --needed \
+while ! pacman -S xorg --noconfirm --needed; do
+    dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
+
+while ! pacman -S --noconfirm --needed \
     sudo \
     lightdm \
     bash \
     vim \
     openbox \
     xterm \
-    lightdm-gtk-greeter
+    lightdm-gtk-greeter \
+    grub; do
+    dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
index 6d1f0d7..7003f35 100755 (executable)
@@ -5,7 +5,10 @@ DISK=$(cat /root/instantARCH/config/disk)
 mount ${DISK}1 /mnt
 
 pacman -Sy --noconfirm
-pacstrap /mnt base linux linux-firmware
+
+while ! pacstrap /mnt base linux linux-firmware; do
+    dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
 
 genfstab -U /mnt >>/mnt/etc/fstab
 
index 31b8dde..66001d2 100755 (executable)
@@ -27,7 +27,6 @@ chrootscript "lang/xorg"
 chrootscript "lang/locale"
 
 # grub: install package, install, generate config
-chrootscript "bootloader/bootloader"
 escript bootloader/install
 chrootscript "bootloader/config"