Optimisations for package install
This commit is contained in:
parent
f1b9165bd5
commit
371d53eca7
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# shellcheck disable=SC2086,SC2046
|
# shellcheck disable=SC2086,SC2046
|
||||||
|
|
||||||
VER=2.1.31
|
VER=2.1.33
|
||||||
|
|
||||||
# default values {
|
# default values {
|
||||||
|
|
||||||
@ -1311,7 +1311,7 @@ install_base()
|
|||||||
[[ $DIST != "ArchLabs" ]] || sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/"{lsb-release,os-release}
|
[[ $DIST != "ArchLabs" ]] || sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/"{lsb-release,os-release}
|
||||||
|
|
||||||
# copy network settings
|
# 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/"
|
[[ -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/"
|
[[ -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'"
|
errshow 1 "chrun 'pacman -Syyu --noconfirm'"
|
||||||
chrun "pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed" 2> "$ERR" 2>&1
|
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'"
|
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
|
# 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
|
# remove the packages we don't want on the installed system
|
||||||
[[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm"
|
[[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm"
|
||||||
@ -1726,11 +1731,10 @@ install_background()
|
|||||||
PACSTRAP=1
|
PACSTRAP=1
|
||||||
(
|
(
|
||||||
install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&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.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist"
|
||||||
cp /etc/pacman.conf "$MNT/etc/pacman.conf"
|
cp /etc/pacman.conf "$MNT/etc/pacman.conf"
|
||||||
al_repo "$MNT/etc/pacman.conf"
|
al_repo "$MNT/etc/pacman.conf"
|
||||||
chrun "systemctl enable NetworkManager.service" > /tmp/bgout 2>&1
|
|
||||||
) &
|
) &
|
||||||
BG_PID=$!
|
BG_PID=$!
|
||||||
else
|
else
|
||||||
@ -1739,7 +1743,7 @@ install_background()
|
|||||||
rsync -a /run/archiso/sfs/airootfs/ "$MNT/" &&
|
rsync -a /run/archiso/sfs/airootfs/ "$MNT/" &&
|
||||||
install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 &&
|
install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 &&
|
||||||
al_repo "$MNT/etc/pacman.conf" &&
|
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=$!
|
BG_PID=$!
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user