theYinYeti Posted November 12, 2008 Share Posted November 12, 2008 (edited) I'm not sure this is the right place as it is about updating/upgrading, not installing… Anyway, here we go: Before the switch to 2009.0, urpmi worked great wether at home (no proxy) or at work (with proxy) because the switch in network profile made the adequate changes to these environment variables: http_proxy, ftp_proxy, https_proxy and no_proxy. Since I switched to 2009.0, I'm unable to install/update/upgrade from work! And I can't set the proxy at the urpmi level since there is no proxy when I use a different network profile. From what I understand, the download is handled by aria2c, so I tried renaming it to aria2c.REAL, and created this script instead: #!/bin/bash if [ -n "$http_proxy" ] && ! grep '[-]-http-proxy' <<<"$*" >/dev/null; then params=( --lowest-speed-limit=0 --timeout=300 --http-proxy="${http_proxy#*://}" --ftp-via-http-proxy=tunnel --metalink-preferred-protocol=http --metalink-enable-unique-protocol=true ) count=${#params[*]} regex1="^($(tr ' ' '|' <<<"${params[*]}" | sed 's/=[^|]*//g'))" regex2="^($(tr ' ' '|' <<<"${params[*]}" | sed 's/=[^|]*/=/g'))" while [ $# -gt 0 ]; do if ! grep -E "$regex1" <<<"$1" >/dev/null; then count=$(($count + 1)) params[$count]="$1" elif ! grep -E "$regex2" <<<"$1" >/dev/null; then shift fi shift done /usr/bin/aria2c.REAL "${params[@]}" else /usr/bin/aria2c.REAL "$@" fi To my dismay, this did not help. What can I do for being seamlessly able to install/update wether I'm behind a proxy or not? Yves. Edited November 24, 2008 by theYinYeti Link to comment Share on other sites More sharing options...
spinynorman Posted November 12, 2008 Share Posted November 12, 2008 I'm not sure this is the right place as it is about updating/upgrading, not installing… As this involves urpmi and a script, I've moved it to Command Line, etc, Yves. :) Link to comment Share on other sites More sharing options...
theYinYeti Posted November 24, 2008 Author Share Posted November 24, 2008 Solved! https://mandrivausers.org/index.php?showtopic=74054 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now