Merge pull request #9 from Wyn10/patch-1

Remove hassle of configuring mirrors.
This commit is contained in:
Timothy Redaelli 2016-04-19 11:10:03 +02:00
commit 182e92c55e

View file

@ -114,7 +114,7 @@ delete_all() {
} }
install_packages() { install_packages() {
local packages="base openssh" local packages="base openssh reflector"
[ "$bootloader" != "none" ] && packages="$packages $bootloader" [ "$bootloader" != "none" ] && packages="$packages $bootloader"
# XXX Install gptdisk for syslinux. To be removed then FS#45029 will be closed # XXX Install gptdisk for syslinux. To be removed then FS#45029 will be closed
[ "$bootloader" = "syslinux" ] && packages="$packages gptfdisk" [ "$bootloader" = "syslinux" ] && packages="$packages gptfdisk"
@ -246,6 +246,16 @@ finalize() {
# Enable SSH login for user root (#3) # Enable SSH login for user root (#3)
sed -i '/^#PermitRootLogin\s/s/.*/&\nPermitRootLogin yes/' /etc/ssh/sshd_config sed -i '/^#PermitRootLogin\s/s/.*/&\nPermitRootLogin yes/' /etc/ssh/sshd_config
# Run reflector to get updated mirrors
cat <<-EOF
Reflector: Rating the 35 most recently synced HTTPS servers, sorting them by download speed
EOF
reflector -l 35 -p https --sort rate --save /etc/pacman.d/mirrorlist
cat <<-EOF cat <<-EOF
Hi, Hi,
@ -257,8 +267,6 @@ finalize() {
# sync ; reboot -f # sync ; reboot -f
Then you'll be able to connect to your VM using SSH and to login using your old root password (or "vps2arch" if you didn't have a root password). Then you'll be able to connect to your VM using SSH and to login using your old root password (or "vps2arch" if you didn't have a root password).
You'll need to configure your mirrors in order to use pacman, please see https://wiki.archlinux.org/index.php/Mirrors
EOF EOF
} }