Added mirrorselect switch and mirrorselect large file switch. Closes #3
This commit is contained in:
parent
811298eb92
commit
b7b3d9c529
|
@ -176,6 +176,15 @@ STAGE3_BASENAME="stage3-$GENTOO_ARCH-systemd"
|
|||
#STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened+nomultilib"
|
||||
#STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened-selinux+nomultilib"
|
||||
|
||||
# If set to true, the best best gentoo mirrors will be selected
|
||||
# automatically by app-portage/mirrorselect
|
||||
SELECT_MIRRORS=true
|
||||
|
||||
# If set to true, mirrorselect will download a large 100kb file
|
||||
# from each mirror for more accurate test results. This can
|
||||
# take significantly longer (~5-10min).
|
||||
SELECT_MIRRORS_LARGE_FILE=false
|
||||
|
||||
# Set to true if the tarball is based on systemd. In this case
|
||||
# we need to use slightly different utilities to setup the base system.
|
||||
SYSTEMD=true
|
||||
|
|
|
@ -120,15 +120,20 @@ configure_portage() {
|
|||
mkdir_or_die 0755 "/etc/portage/package.keywords"
|
||||
touch_or_die 0644 "/etc/portage/package.keywords/zz-autounmask"
|
||||
|
||||
if [[ $SELECT_MIRRORS == "true" ]]; then
|
||||
einfo "Temporarily installing mirrorselect"
|
||||
try emerge --verbose --oneshot app-portage/mirrorselect
|
||||
|
||||
einfo "Selecting fastest portage mirrors"
|
||||
try mirrorselect -s 4 -b 10 -D
|
||||
mirrorselect_params=("-s" "4" "-b" "10")
|
||||
[[ $SELECT_MIRRORS_LARGE_FILE == "true" ]] \
|
||||
&& mirrorselect_params+=("-D")
|
||||
try mirrorselect "${mirrorselect_params[@]}"
|
||||
|
||||
einfo "Adding ~$GENTOO_ARCH to ACCEPT_KEYWORDS"
|
||||
echo "ACCEPT_KEYWORDS=\"~$GENTOO_ARCH\"" >> /etc/portage/make.conf \
|
||||
|| die "Could not modify /etc/portage/make.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
install_sshd() {
|
||||
|
|
Loading…
Reference in New Issue