summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-06-20 18:17:41 (GMT)
committerColin Watson <cjwatson@debian.org>2007-06-20 18:17:41 (GMT)
commitae7c66875037bafa64b7b7db356f77c919159072 (patch)
tree634b56fdfb069fa55a444cb10172a5b556d01166 /debootstrap
parent6eba42cae87de194f4b88a8c91e9bbd86c87d0e8 (diff)
downloaddebootstrap-ae7c66875037bafa64b7b7db356f77c919159072.zip
debootstrap-ae7c66875037bafa64b7b7db356f77c919159072.tar.gz
debootstrap-ae7c66875037bafa64b7b7db356f77c919159072.tar.bz2
* Add default_mirror function; reorganise the debootstrap script a little
so that it works. Set the default mirror for Ubuntu suites to http://archive.ubuntu.com/ubuntu, and the default mirror for Debian etch/lenny/sid architectures other than amd64 and i386 to http://ftp.us.debian.org/debian (per ajt). r47570
Diffstat (limited to 'debootstrap')
-rw-r--r--debootstrap24
1 files changed, 15 insertions, 9 deletions
diff --git a/debootstrap b/debootstrap
index 6adb15c..664d07d 100644
--- a/debootstrap
+++ b/debootstrap
@@ -236,7 +236,6 @@ if [ "$SECOND_STAGE_ONLY" = "true" ]; then
SUPPORTED_VARIANTS="$VARIANT"
fi
TARGET=/
- MIRRORS=null:
SCRIPT=$DEBOOTSTRAP_DIR/suite-script
else
if [ "$1" = "" -o "$2" = "" ]; then
@@ -253,18 +252,13 @@ else
fi
fi
- MIRRORS="$DEF_MIRROR"
SCRIPT="$DEBOOTSTRAP_DIR/scripts/$1"
if [ -n "$VARIANT" -a -e "${SCRIPT}.${VARIANT}" ]; then
SCRIPT="${SCRIPT}.${VARIANT}"
SUPPORTED_VARIANTS="$VARIANT"
fi
- if [ "$3" != "" ]; then
- MIRRORS="$3"
- MIRRORS="${MIRRORS%/}"
- if [ "$4" != "" ]; then
- SCRIPT="$4"
- fi
+ if [ "$4" != "" ]; then
+ SCRIPT="$4"
fi
fi
@@ -281,7 +275,7 @@ else
error 1 WHATARCH "Couldn't work out current architecture"
fi
-export MIRRORS ARCH SUITE TARGET
+export ARCH SUITE TARGET
if am_doing_phase first_stage second_stage; then
if [ -x /usr/bin/id ] && [ `id -u` -ne 0 ]; then
@@ -348,6 +342,18 @@ fi
. "$SCRIPT"
+if [ "$SECOND_STAGE_ONLY" = "true" ]; then
+ MIRRORS=null:
+else
+ MIRRORS="$DEF_MIRROR"
+ if [ "$3" != "" ]; then
+ MIRRORS="$3"
+ MIRRORS="${MIRRORS%/}"
+ fi
+fi
+
+export MIRRORS
+
ok=false
for v in $SUPPORTED_VARIANTS; do
if doing_variant $v; then ok=true; fi