diff --git a/bin/xt-install-image b/bin/xt-install-image index cdac40a..acc4fad 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -757,12 +757,21 @@ sub do_debootstrap $EXTRA .= " --arch $CONFIG{'arch'}"; } + # + # Setup http_proxy so that debootstrap pulls files through the apt-proxy + # + my $PROXY = ''; + if ( $CONFIG{ 'apt_proxy' } ) + { + print("Using apt_proxy: $CONFIG{'apt_proxy'}\n"); + $PROXY = "http_proxy=\"$CONFIG{'apt_proxy'}\""; + } # # This is the command we'll run # my $command = - "$cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; + "$PROXY $cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; # # Run the command. diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index d606c9d..b241316 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -278,6 +278,9 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_maverick = http://archive.ubuntu.com/ubuntu # mirror_natty = http://archive.ubuntu.com/ubuntu +# If this is defined it will be used by debootstrap +# +# apt_proxy = # # Filesystem options for the different filesystems we support.