theYinYeti Posted November 12, 2008 Report 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 Quote Link to comment Share on other sites More sharing options...
spinynorman Posted November 12, 2008 Report 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. :) Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted November 24, 2008 Author Report Share Posted November 24, 2008 Solved! https://mandrivausers.org/index.php?showtopic=74054 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.