Ubuntu FAI behind ftp_proxy (squid)

mettler at gmit-gmbh.de mettler at gmit-gmbh.de
Tue Jul 7 10:30:29 CEST 2009


Hi,
In our network we have no gateway and no DNS server.
All internet access is done via a Squid-proxy.
So we need to proxy ftp over http.


This is no problem with ubuntu-http sources, but with ftp.


There is a Bug in Ubuntu preventing us from using
/etc/apt/apt.conf.d/proxy
Acquire::http::Proxy "http://192.168.30.42:2121";
Acquire::ftp::Proxy "http://192.168.30.42:2121";

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=123144



In a running system we could just add the proxy settings like this:
/etc/environment or /etc/bash.basrh
ftp_proxy=http://192.168.30.42:2121
http_proxy=http://192.168.30.42:2121

and use 'apt-get update'
But that did not work inside the chroot during installation ;(



So we had to set ROOTCMD via a .var file to:
---
ROOTCMD="chroot $target /usr/bin/env http_proxy=192.168.30.42:2121
ftp_proxy=http://192.168.30.42:2121
---


This helped so far, but install_packages does't respekt the ROOTCMD
So we changed line 118 of install_packages from
$rootcmd = ($FAI_ROOT eq "/" ) ? '' : "chroot $FAI_ROOT";
to
$rootcmd = ($FAI_ROOT eq "/" ) ? '' : "chroot $FAI_ROOT /usr/bin/env
http_proxy=192.168.30.42:2121 ftp_proxy=192.168.30.42:2121";


This works for me, but
Is there any better way to do this?!
or any other way to influence the install_packages behaviour ?



Regards!
Stephan


-- 
Stephan Mettler, System Administrator (Trainee)
Mail: mettler at gmit-gmbh.de
VCard: http://www.gmit-gmbh.de/mettler.vcf

GMIT GmbH, Novalisstrasse 10, D-10115 Berlin, Germany
Phone: +49 30 240 88 23 30
Fax  : +49 30 240 88 23 59
Amtsgericht Charlottenburg HRB 100581B
Geschäftsführer: Stephan Skrodzki
http://www.gmit-gmbh.de



More information about the linux-fai mailing list