source: opsi/server/wsusoffline/wsusoffline/download-updates.patch@ 1142

Last change on this file since 1142 was 1142, checked in by joergs, on Jan 25, 2013 at 12:45:18 PM

include patch

File size: 1.6 KB
Line 
1--- wsusoffline/sh/DownloadUpdates.sh.orig 2013-01-24 20:02:57.167575678 +0100
2+++ wsusoffline/sh/DownloadUpdates.sh 2013-01-24 20:10:34.726556604 +0100
3@@ -157,15 +157,6 @@
4 exit 1
5 }
6
7-case $sys in
8- *-x64)
9- OS_ARCH=x64
10- ;;
11- *)
12- OS_ARCH=x86
13- ;;
14-esac
15-
16 test "$2" || {
17 echo language is not set.
18 exit 1
19@@ -410,16 +401,23 @@
20
21 getproxy()
22 {
23-read -p "Please specify your proxy (default: none, http://[username:password@]<server>:<port>]) " http_proxy
24-test "$http_proxy" || http_proxy="none"
25-case "$http_proxy" in
26- http:*|none|n)
27- ;;
28- *)
29- echo wrong syntax for proxy server
30- exit 1
31- ;;
32-esac
33+ read -p "Please specify your proxy (default: ${http_proxy:-none}, format: http://[username:password@]<server>:<port>]) " my_http_proxy
34+ case "$my_http_proxy" in
35+ "")
36+ # no proxy defined
37+ ;;
38+ "none"|"n")
39+ # disable http_proxy
40+ unset http_proxy
41+ ;;
42+ http:*)
43+ http_proxy=$my_http_proxy
44+ ;;
45+ *)
46+ echo "wrong syntax for proxy server"
47+ exit 1
48+ ;;
49+ esac
50 }
51
52 makeiso()
53@@ -504,6 +502,15 @@
54 makeiso
55 fi
56
57+case $sys in
58+ *-x64)
59+ OS_ARCH=x64
60+ ;;
61+ *)
62+ OS_ARCH=x86
63+ ;;
64+esac
65+
66 #set proxy
67 if [ "$http_proxy" != "" ] && [ "$http_proxy" != "none" ]; then
68 export http_proxy=$http_proxy
69@@ -528,7 +535,7 @@
70 System: $sys
71 Language: $lang
72 Parameter: $param1 $param2 $param3 $param4 $param5 $param7
73- Proxy: $http_proxy
74+ Proxy: ${http_proxy:-none}
75 END
76
77 if [ "$externparam" != "1" ]; then
Note: See TracBrowser for help on using the repository browser.