--- wsusoffline/sh/DownloadUpdates.sh.orig 2013-01-24 20:02:57.167575678 +0100 +++ wsusoffline/sh/DownloadUpdates.sh 2013-01-24 20:10:34.726556604 +0100 @@ -157,15 +157,6 @@ exit 1 } -case $sys in - *-x64) - OS_ARCH=x64 - ;; - *) - OS_ARCH=x86 - ;; -esac - test "$2" || { echo language is not set. exit 1 @@ -410,16 +401,23 @@ getproxy() { -read -p "Please specify your proxy (default: none, http://[username:password@]:]) " http_proxy -test "$http_proxy" || http_proxy="none" -case "$http_proxy" in - http:*|none|n) - ;; - *) - echo wrong syntax for proxy server - exit 1 - ;; -esac + read -p "Please specify your proxy (default: ${http_proxy:-none}, format: http://[username:password@]:]) " my_http_proxy + case "$my_http_proxy" in + "") + # no proxy defined + ;; + "none"|"n") + # disable http_proxy + unset http_proxy + ;; + http:*) + http_proxy=$my_http_proxy + ;; + *) + echo "wrong syntax for proxy server" + exit 1 + ;; + esac } makeiso() @@ -504,6 +502,15 @@ makeiso fi +case $sys in + *-x64) + OS_ARCH=x64 + ;; + *) + OS_ARCH=x86 + ;; +esac + #set proxy if [ "$http_proxy" != "" ] && [ "$http_proxy" != "none" ]; then export http_proxy=$http_proxy @@ -528,7 +535,7 @@ System: $sys Language: $lang Parameter: $param1 $param2 $param3 $param4 $param5 $param7 - Proxy: $http_proxy + Proxy: ${http_proxy:-none} END if [ "$externparam" != "1" ]; then