From 371d53eca784fd1719ebd8eb465e13993b16f516 Mon Sep 17 00:00:00 2001 From: natemaia Date: Fri, 24 Apr 2020 18:33:57 -0700 Subject: [PATCH] Optimisations for package install --- archlabs-installer | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index ec28878..e37ee2b 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -7,7 +7,7 @@ # shellcheck disable=SC2086,SC2046 -VER=2.1.31 +VER=2.1.33 # default values { @@ -1311,7 +1311,7 @@ install_base() [[ $DIST != "ArchLabs" ]] || sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/"{lsb-release,os-release} # copy network settings - [[ -d /etc/netctl ]] && cp -rfv /etc/netctl "$MNT/etc/" + [[ -d /etc/netctl/interfaces ]] && cp -rfv /etc/netctl/interfaces "$MNT/etc/netctl/" [[ -f /etc/resolv.conf ]] && cp -fv /etc/resolv.conf "$MNT/etc/" [[ -e /etc/NetworkManager/system-connections ]] && cp -rvf /etc/NetworkManager/system-connections "$MNT/etc/NetworkManager/" @@ -1529,9 +1529,14 @@ install_packages() errshow 1 "chrun 'pacman -Syyu --noconfirm'" chrun "pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed" 2> "$ERR" 2>&1 errshow 1 "chrun 'pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed'" + if [[ $PACSTRAP != 1 ]]; then + chrun "pacman -S ${ISO_PKGS[*]} --noconfirm --needed" 2> "$ERR" 2>&1 + errshow 1 "chrun 'pacman -S ${ISO_PKGS[*]} --noconfirm --needed'" + chrun "systemctl enable NetworkManager.service" > /tmp/bgout 2>&1 + fi # reinstalling iputils fixes the network issue for non-root users - # chrun "pacman -S iputils --noconfirm" + chrun "pacman -S iputils --noconfirm" # remove the packages we don't want on the installed system [[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm" @@ -1726,11 +1731,10 @@ install_background() PACSTRAP=1 ( install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 && - pacstrap /mnt ${BASE_PKGS[*]} ${ISO_PKGS[*]} > /tmp/bgout 2>&1 && + pacstrap /mnt > /tmp/bgout 2>&1 && cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist" cp /etc/pacman.conf "$MNT/etc/pacman.conf" al_repo "$MNT/etc/pacman.conf" - chrun "systemctl enable NetworkManager.service" > /tmp/bgout 2>&1 ) & BG_PID=$! else @@ -1739,7 +1743,7 @@ install_background() rsync -a /run/archiso/sfs/airootfs/ "$MNT/" && install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 && al_repo "$MNT/etc/pacman.conf" && - chrun "pacman -Sy && pacman -Syyu ${BASE_PKGS[*]} --noconfirm --needed" > /tmp/bgout 2>&1 + chrun "pacman -Syyu ${BASE_PKGS[*]} --noconfirm --needed" > /tmp/bgout 2>&1 ) & BG_PID=$! fi