added better diagnostic for failed debootstrap download
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 23 Sep 2004 22:04:25 +0000 (22:04 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 23 Sep 2004 22:04:25 +0000 (22:04 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1708 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vserver-build.debootstrap

index e804181..e824d64 100644 (file)
@@ -58,7 +58,28 @@ function findDebootstrap
         read tmp <$DEBOOTSTRAP_URI
         case "$tmp" in
        (/*)                    ln -s "$tmp" "$dst";;
-       (http://*|ftp://*)      $_WGET -nv -O "$dst" "$tmp";;
+       (http://*|ftp://*)
+           $_WGET -nv -O "$dst" "$tmp" || {
+               cat <<EOF >&2
+ERROR: Could not download the debootstrap package from
+
+   $dst
+
+Usually, this means that Debian released a new version which is unknown
+to util-vserver and removed the known ones. To fix this, go to
+
+   http://ftp.debian.org/debian/pool/main/d/debootstrap/
+
+(or a nearby mirror) and search the URL for the most recent *.deb
+package matching your platform. Then, put this URL into
+
+   $CONFDIR/.defaults/apps/debootstrap/uri
+
+and retry the vserver-build command again.
+EOF
+               exit 1
+           }
+           ;;
        (*)                     echo $"Unsupported URI scheme '$tmp'" >&2
                                exit 1;;
         esac