From 98f43f6640a8617b7523d8ce1a909e2a3c70299c Mon Sep 17 00:00:00 2001 From: gh2o Date: Sun, 13 Jul 2014 21:47:02 -0700 Subject: [PATCH] add option to install haveged to speed things up --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 9e2db2d..514f3e6 100755 --- a/install.sh +++ b/install.sh @@ -55,6 +55,20 @@ clean_archroot() { done {lsfd}< <(ls /archroot) } +install_haveged() { + if which haveged >/dev/null 2>&1; then + return + fi + log "Creating keys for pacman will be very slow because" + log "KVM lacks true sources of ramdomness. Install haveged" + log "to speed it up?" + local response + read -p '([yes] or no) ' response + if [ "${response}" = "yes" ] || [ -z "${response}" ]; then + apt-get -y install haveged + fi +} + initialize_coredb() { log "Downloading package database ..." wget "${archlinux_mirror}/core/os/x86_64/core.db" @@ -339,6 +353,8 @@ installer_main() { cd /archroot/installer clean_archroot + install_haveged + initialize_coredb calculate_dependencies download_packages