From 83df0500533e6e5b7a93b4d37df34a0952e2795b Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Thu, 18 Dec 2008 15:51:44 +0100 Subject: mirrorlist scope/softcoding cleanups --- src/core/procedures/base | 2 +- src/core/procedures/interactive | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/procedures') diff --git a/src/core/procedures/base b/src/core/procedures/base index 3c2a54f..fa88210 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -5,6 +5,7 @@ var_DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3" var_TARGET_DIR="/mnt" # When overriding this, do _not_ add a trailing /. It's not needed and maybe you could even break something var_RUNTIME_PACKAGES= var_PKG_FILE=$RUNTIME_DIR/package-list +var_MIRRORLIST="/etc/pacman.d/mirrorlist" var_UI_TYPE="cli" # set to cli or dia for dialog ###### Phases ( can be overridden by more specific procedures) ###### @@ -64,7 +65,6 @@ worker_select_source () var_PKG_SOURCE_TYPE='cd' var_FILE_URL="file:///src/core/pkg" var_SYNC_URL= - var_MIRRORLIST="/etc/pacman.d/mirrorlist" # if you override to use ftp (or ask user and he chooses ftp) don't forget to configure the network and to select_mirrors } diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index 6ee7023..dc1bf2b 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -115,7 +115,9 @@ worker_configure_system() # /etc/pacman.d/mirrorlist # add installer-selected mirror to the top of the mirrorlist if [ "$var_PKG_SOURCE_TYPE" = "ftp" -a "${SYNC_URL}" != "" ]; then - awk "BEGIN { printf(\"# Mirror used during installation\nServer = "${SYNC_URL}"\n\n\") } 1 " "${var_TARGET_DIR}/etc/pacman.d/mirrorlist" + debug "Adding choosen mirror (${SYNC_URL}) to ${var_TARGET_DIR}/$var_MIRRORLIST" + mirrorlist=`awk "BEGIN { printf(\"# Mirror used during installation\nServer = "${SYNC_URL}"\n\n\") } 1 " "${var_TARGET_DIR}/$var_MIRRORLIST"` + echo "$mirrorlist" > "${var_TARGET_DIR}/$var_MIRRORLIST" #TODO: test this, this may not work fi # /etc/rc.conf -- cgit v1.2.3-54-g00ecf