summaryrefslogtreecommitdiff
blob: 075030963aa2f7c9590131c7fce0b3f98b545d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- server/plugins/ltsp-build-client/Gentoo/002-set-stage-file.orig	2011-03-28 21:05:48.460448127 +0200
+++ server/plugins/ltsp-build-client/Gentoo/002-set-stage-file	2011-03-29 18:44:14.002448307 +0200
@@ -3,8 +3,13 @@
         add_option "stage-uri" "`eval_gettext "Stage 3 URI"`" "advanced" "true"
         ;;
     configure)
-        if [ -n "$option_stage_uri_value" ] || [ -n $STAGE_URI ]; then
+        if [ -n "$option_stage_uri_value" ] || [ -n "$STAGE_URI" ]; then
             STAGE_URI="${option_stage_uri_value:-$STAGE_URI}"
+            PROTOCOL=$(echo ${STAGE_URI} | sed -e 's|://.\+$||')
+        fi
+
+        # only download if stage not local
+        if [[ "$PROTOCOL" != "file" ]]; then
             STAGE_ARCH=${ARCH}
             DISTFILES_BASE="http://distfiles.gentoo.org/releases/${ARCH}/autobuilds"