Merge pull request #9 from Wyn10/patch-1
Remove hassle of configuring mirrors.
This commit is contained in:
commit
182e92c55e
1 changed files with 11 additions and 3 deletions
14
vps2arch
14
vps2arch
|
@ -114,7 +114,7 @@ delete_all() {
|
|||
}
|
||||
|
||||
install_packages() {
|
||||
local packages="base openssh"
|
||||
local packages="base openssh reflector"
|
||||
[ "$bootloader" != "none" ] && packages="$packages $bootloader"
|
||||
# XXX Install gptdisk for syslinux. To be removed then FS#45029 will be closed
|
||||
[ "$bootloader" = "syslinux" ] && packages="$packages gptfdisk"
|
||||
|
@ -247,6 +247,16 @@ finalize() {
|
|||
# Enable SSH login for user root (#3)
|
||||
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
|
||||
Hi,
|
||||
your VM has successfully been reimaged with Arch Linux.
|
||||
|
@ -257,8 +267,6 @@ finalize() {
|
|||
# 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).
|
||||
|
||||
You'll need to configure your mirrors in order to use pacman, please see https://wiki.archlinux.org/index.php/Mirrors
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue