[Pkg-ltsp-devel] Bug#766460: ltsp-client-builder: Need to set web proxy environment in postinst

Petter Reinholdtsen pere at hungry.com
Thu Oct 23 09:20:04 UTC 2014


Package: ltsp-client-builder
Version: 5.5.4-1
Severity: important
User: debian-edu at lists.debian.org
Usertags: debian-edu

On a machine behind a firewall enforcing the use of a web proxy, like
the setup I have in my lap (simulating schools around the country), the
LTSP plugin scripts are unable to use wget and similar tools to check
what they can reach on the web.

The fix is to add code similar to the one in base-installer, where
http_proxy and https_proxy is passed on when set.  See
<URL: http://anonscm.debian.org/cgit/d-i/base-installer.git/tree/debian/bootstrap-base.postinst >.

Please add code similar to this in the ltsp-client-builder postinst:

  load_proxy_conf() {
    db_get mirror/protocol || true
    local PROTOCOL="$RET"
    if [ "$PROTOCOL" = "http" ]; then
        db_get mirror/http/proxy
        http_proxy="$RET" || true
        if [ "$http_proxy" ]; then
            export http_proxy
        fi
    fi
    if [ "$http_proxy" ] ; then
        logger "info: using http_proxy=$http_proxy."
    else
        logger "info: no proxy used."
    fi
  }
  load_proxy_conf

The function is similar to the one we provide in /lib/debian-edu-common
within d-i from the debian-edu-install package. :)

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-ltsp-devel mailing list