blob: 48fa7457e51c8047836a70e6a3534276ea297499 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
--- fetch-crl-2.7.0/edg-fetch-crl.orig 2009-02-26 08:54:17 +0000
+++ fetch-crl-2.7.0/edg-fetch-crl 2009-02-26 09:20:27 +0000
@@ -94,8 +94,8 @@
allWarnings=no # warnings follow verbosity
# get defaults
-WGET_RETRIES=2
-WGET_TIMEOUT=10
+#WGET_RETRIES=2
+#WGET_TIMEOUT=10
FETCH_CRL_SYSCONFIG="${FETCH_CRL_SYSCONFIG:-/etc/fetch-crl/fetch-crl}"
# specific work-around for incidental filesystem corruption
@@ -149,7 +149,15 @@
fi
# add the other default arguments
- wgetOptions="${wgetOptions} -t $WGET_RETRIES -T $WGET_TIMEOUT "
+ if [ -n "$WGET_RETRIES" ]; then
+ wgetOptions="${wgetOptions} -t $WGET_RETRIES "
+ fi
+ if [ -n "$WGET_TIMEOUT" ]; then
+ wgetOptions="${wgetOptions} -T $WGET_TIMEOUT "
+ fi
+ if [ -n "$WGET_TIMESTAMPING" ] && [ "$WGET_TIMESTAMPING" != "no" ]; then
+ wgetOptions="${wgetOptions} -N "
+ fi
# only add "-q" if the extra options do not have a -v. They are exclusive
expr match "${wgetAdditionalOptions}" '.*-v' >/dev/null 2>&1
@@ -175,8 +183,8 @@
${rm} -f "${cacheDirectory}/${hash}/pre"
${cp} "${cacheDirectory}/${hash}/"* \
"${cacheDirectory}/${hash}/pre" >/dev/null 2>&1
- PrintDebug ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}"
- ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}"
+ PrintDebug ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}"
+ ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}"
rc=$?
if [ $rc -ne 0 ]; then
PrintWarning "RetrieveFileByURL: wget download error $rc for ${url}"
|