summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-05-22 11:25:07 +0200
committerTails developers <amnesia@boum.org>2012-05-22 11:25:07 +0200
commit83ac60274fd5a679c38e504e9ce9620d03997c4f (patch)
treebe09cea212fe06d1aba79784624b7e5845d9c9dc /Rakefile
parenta4c32241ae17a119e165dff575458f774a25b0b2 (diff)
vagrant: Factor out in-VM proxy URL
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index d0415e6..8ca0c2b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -37,6 +37,9 @@ EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS', 'TAILS_RAM_BUILD', 'TA
# Let's save the http_proxy set before playing with it
EXTERNAL_HTTP_PROXY = ENV['http_proxy']
+# In-VM proxy URL
+INTERNEL_HTTP_PROXY = "http://#{VIRTUAL_MACHINE_HOSTNAME}:3142"
+
def current_vm_memory
env = Vagrant::Environment.new(:cwd => VAGRANT_PATH, :ui_class => Vagrant::UI::Basic)
uuid = env.primary_vm.uuid
@@ -107,7 +110,7 @@ task :parse_build_options do
abort "No HTTP proxy set, but one is required by TAILS_BUILD_OPTIONS. Aborting." unless EXTERNAL_HTTP_PROXY
ENV['http_proxy'] = EXTERNAL_HTTP_PROXY
when 'vmproxy'
- ENV['http_proxy'] = "http://#{VIRTUAL_MACHINE_HOSTNAME}:3142"
+ ENV['http_proxy'] = INTERNEL_HTTP_PROXY
when 'noproxy'
ENV['http_proxy'] = nil
# SquashFS compression settings