cron.d: Allow central override of the wget options
authorFrank Lichtenheld <frank@lichtenheld.de>
Wed, 12 Dec 2007 00:07:25 +0000 (01:07 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Wed, 12 Dec 2007 00:07:25 +0000 (01:07 +0100)
Use this to set tries and timeout to something more reasonable.
Pressed by the ddtp outage.

config.sh.sed.in
cron.d/100syncarchive
cron.d/100syncarchive_amd64
cron.d/100syncarchive_backports
cron.d/100syncarchive_debports
cron.d/100syncarchive_installer
cron.d/100syncarchive_m68k
cron.d/100syncarchive_maintainers
cron.d/100syncarchive_volatile
cron.d/110debtags
cron.d/120synctrans

index 9a95654f61fd1bd6bd13cd2dac53371dd3272574..afc9987519f32424cf8cca857f66ee130efc9e46 100644 (file)
@@ -32,6 +32,8 @@ amd64_ftpsite=http://amd64.debian.net/debian
 debports_ftpsite=http://ftp.debian-ports.org/debian
 ddtp_ftpsite=http://ddtp.debian.net/debian
 
+wget_cmd="wget --no-verbose --tries=2 --timeout=60" 
+
 root=""
 
 # Architectures
index 5cb5af4e2769af6a5ef098560b5a0886b72f8fc6..a6b0e83429e311517cdc601ef62531842dabd198 100755 (executable)
@@ -15,8 +15,8 @@ then
         echo "retrieve Release(.gpg) $dist"
        test -d us/${dist} || mkdir -p us/${dist}
        (cd us/${dist} &&
-           wget -q -N ${ftpsite}/dists/${dist}/Release &&
-           wget -q -N ${ftpsite}/dists/${dist}/Release.gpg )
+           $wget_cmd -N ${ftpsite}/dists/${dist}/Release &&
+           $wget_cmd -N ${ftpsite}/dists/${dist}/Release.gpg )
         
        foo=\$arch_${dist//-/_}
        for arch in `eval echo $foo`
@@ -29,20 +29,20 @@ then
                echo retrieve Packages $dist/$part/$arch
                test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
                (cd us/${dist}/${part}/binary-${arch} &&
-                   wget -q -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+                   $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
            done
            #FIXME: no Contents files for p-u
            test ! "$dist" = "experimental" || continue
            echo retrieve Contents $dist/$arch
            (cd us/${dist} &&
-               wget -q -N ${ftpsite}/dists/${dist}/Contents-${arch}.gz)
+               $wget_cmd -N ${ftpsite}/dists/${dist}/Contents-${arch}.gz)
        done
        for part in ${parts}
        do
            echo retrieve Sources $dist/$part
            test -d us/${dist}/${part}/source || mkdir -p us/${dist}/${part}/source
             (cd us/${dist}/${part}/source &&
-                wget -q -N ${ftpsite}/dists/${dist}/${part}/source/Sources.gz)
+                $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/source/Sources.gz)
        done
     done
 else
@@ -90,8 +90,8 @@ do
     echo "retrieve Release(.gpg) $dist"
     test -d security/${dist} || mkdir -p security/${dist}
     (cd security/${dist} &&
-       wget -q -N ${security_ftpsite}/dists/${dist}/updates/Release &&
-       wget -q -N ${security_ftpsite}/dists/${dist}/updates/Release.gpg )
+       $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/Release &&
+       $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/Release.gpg )
         
     foo=\$arch_${dist//-/_}
     for arch in `eval echo $foo`
@@ -101,7 +101,7 @@ do
        echo retrieve Packages $dist/$part/security/$arch
        test -d security/${dist}/${part}/binary-${arch} || mkdir -p security/${dist}/${part}/binary-${arch}
        (cd  security/${dist}/${part}/binary-${arch} &&
-           wget -q -N ${security_ftpsite}/dists/${dist}/updates/${part}/binary-${arch}/Packages.gz)
+           $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/${part}/binary-${arch}/Packages.gz)
       done
     done
     for part in ${parts}
@@ -109,6 +109,6 @@ do
         echo retrieve Sources $dist/$part/security
         test -d security/${dist}/${part}/source || mkdir -p security/${dist}/${part}/source
         (cd security/${dist}/${part}/source &&
-            wget -q -N ${security_ftpsite}/dists/${dist}/updates/${part}/source/Sources.gz)
+            $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/${part}/source/Sources.gz)
     done
 done
index 417e8c6d8f7e5e08e12f4619c7eac2487c3d46b8..535604f9a978b919fdcc1ffec97ccfec48c727c4 100755 (executable)
@@ -14,18 +14,18 @@ for dist in sarge
   echo "retrieve Release(.gpg) $dist"
   test -d amd64/${dist} || mkdir -p amd64/${dist}
   (cd amd64/${dist} &&
-      wget -q -N ${amd64_ftpsite}/dists/${dist}/Release &&
-      wget -q -N ${amd64_ftpsite}/dists/${dist}/Release.gpg )
+      $wget_cmd -N ${amd64_ftpsite}/dists/${dist}/Release &&
+      $wget_cmd -N ${amd64_ftpsite}/dists/${dist}/Release.gpg )
 
   for part in ${parts} main/debian-installer
     do
     echo retrieve Packages $dist/$part/$arch
     test -d amd64/${dist}/${part}/binary-${arch} || mkdir -p amd64/${dist}/${part}/binary-${arch}
     (cd amd64/${dist}/${part}/binary-${arch} &&
-       wget -q -N ${amd64_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+       $wget_cmd -N ${amd64_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
   done
   echo retrieve Contents $dist/$arch
   (cd amd64/${dist} &&
-      wget -q -N ${amd64_ftpsite}/dists/${dist}/Contents-${arch}.gz)
+      $wget_cmd -N ${amd64_ftpsite}/dists/${dist}/Contents-${arch}.gz)
 done
 
index be82d5f088c89433e8e043014deb59136f5247a7..069b1e41c0e8699a4c5d90229617c5d14bfe3a19 100755 (executable)
@@ -12,8 +12,8 @@ do
   echo "retrieve Release(.gpg) $dist-backports"
   test -d backports/${dist}-backports || mkdir -p backports/${dist}-backports
   (cd backports/${dist}-backports &&
-           wget -q -N ${backports_ftpsite}/dists/${dist}-backports/Release &&
-           wget -q -N ${backports_ftpsite}/dists/${dist}-backports/Release.gpg )
+           $wget_cmd -N ${backports_ftpsite}/dists/${dist}-backports/Release &&
+           $wget_cmd -N ${backports_ftpsite}/dists/${dist}-backports/Release.gpg )
 
     foo=\$arch_${dist//-/_}
     for arch in `eval echo $foo`
@@ -23,17 +23,17 @@ do
        echo retrieve Packages $dist-backports/$part/$arch
        test -d backports/${dist}-backports/${part}/binary-${arch} || mkdir -p backports/${dist}-backports/${part}/binary-${arch}
        (cd backports/${dist}-backports/${part}/binary-${arch} &&
-           wget -q -N ${backports_ftpsite}/dists/${dist}-backports/${part}/binary-${arch}/Packages.gz)
+           $wget_cmd -N ${backports_ftpsite}/dists/${dist}-backports/${part}/binary-${arch}/Packages.gz)
       done
       echo retrieve Contents $dist-backports/$arch
       (cd backports/${dist}-backports &&
-         wget -q -N ${backports_ftpsite}/dists/${dist}-backports/Contents-${arch}.gz)
+         $wget_cmd -N ${backports_ftpsite}/dists/${dist}-backports/Contents-${arch}.gz)
     done
     for part in ${parts}
     do
         echo retrieve Sources $dist-backports/$part
         test -d backports/${dist}-backports/${part}/source || mkdir -p backports/${dist}-backports/${part}/source
         (cd backports/${dist}-backports/${part}/source &&
-            wget -q -N ${backports_ftpsite}/dists/${dist}-backports/${part}/source/Sources.gz)
+            $wget_cmd -N ${backports_ftpsite}/dists/${dist}-backports/${part}/source/Sources.gz)
     done
 done
index 897d1ddcf0eb83da435befa8f8cb32360e290f39..05b967f0628796ccf68870682648f56424f7168e 100755 (executable)
@@ -14,8 +14,8 @@ for dist in sid experimental
   echo "retrieve Release(.gpg) $dist"
   test -d debports/${dist} || mkdir -p debports/${dist}
   (cd debports/${dist} &&
-           wget -q -N ${debports_ftpsite}/dists/${dist}/Release &&
-           wget -q -N ${debports_ftpsite}/dists/${dist}/Release.gpg )
+           $wget_cmd -N ${debports_ftpsite}/dists/${dist}/Release &&
+           $wget_cmd -N ${debports_ftpsite}/dists/${dist}/Release.gpg )
 
   for arch in $architectures
     do
@@ -24,10 +24,10 @@ for dist in sid experimental
       echo retrieve Packages $dist/$part/$arch
       test -d debports/${dist}/${part}/binary-${arch} || mkdir -p debports/${dist}/${part}/binary-${arch}
       (cd debports/${dist}/${part}/binary-${arch} &&
-         wget -q -N ${debports_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+         $wget_cmd -N ${debports_ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
     done
     echo retrieve Contents $dist/$arch
     (cd debports/${dist} &&
-       wget -q -N ${debports_ftpsite}/dists/${dist}/Contents-${arch}.gz)
+       $wget_cmd -N ${debports_ftpsite}/dists/${dist}/Contents-${arch}.gz)
   done
 done
index 396b249ea840e594c2b59c611a76534bc31cad19..6e07052cbd38b211e1e01c16d4a4feec8e11b9ee 100755 (executable)
@@ -25,7 +25,7 @@ then
                echo retrieve Packages $dist/$part/$arch
                test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
                (cd us/${dist}/${part}/binary-${arch} &&
-                   wget -q -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
+                   $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
            done
        done
     done
index f8aa4f50b1d70261f1bb5c94092444284653a1e6..f0d0aac42756a26d82fde0a4de4d7011cd64dd4a 100755 (executable)
@@ -16,8 +16,8 @@ then
         echo "retrieve Release(.gpg) $dist"
        test -d us/${dist}-${arch} || mkdir -p us/${dist}-${arch}
        (cd us/${dist} &&
-           wget -q -N ${ftpsite}/dists/${dist}-${arch}/Release &&
-           wget -q -N ${ftpsite}/dists/${dist}-${arch}/Release.gpg )
+           $wget_cmd -N ${ftpsite}/dists/${dist}-${arch}/Release &&
+           $wget_cmd -N ${ftpsite}/dists/${dist}-${arch}/Release.gpg )
         
 #      foo=\$arch_${dist//-/_}
 #      for arch in `eval echo $foo`
@@ -27,20 +27,20 @@ then
                echo retrieve Packages $dist-${arch}/$part/$arch
                test -d us/${dist}-${arch}/${part}/binary-${arch} || mkdir -p us/${dist}-${arch}/${part}/binary-${arch}
                (cd us/${dist}-${arch}/${part}/binary-${arch} &&
-                   wget -q -N ${ftpsite}/dists/${dist}-${arch}/${part}/binary-${arch}/Packages.gz)
+                   $wget_cmd -N ${ftpsite}/dists/${dist}-${arch}/${part}/binary-${arch}/Packages.gz)
            done
            #FIXME: no Contents files for p-u
            test ! "$dist" = "experimental" || continue
            echo retrieve Contents $dist/$arch
            (cd us/${dist}-${arch} &&
-               wget -q -N ${ftpsite}/dists/${dist}-${arch}/Contents-${arch}.gz)
+               $wget_cmd -N ${ftpsite}/dists/${dist}-${arch}/Contents-${arch}.gz)
 #      done
        for part in ${parts}
        do
            echo retrieve Sources $dist-${arch}/$part
            test -d us/${dist}-${arch}/${part}/source || mkdir -p us/${dist}-${arch}/${part}/source
             (cd us/${dist}-${arch}/${part}/source &&
-                wget -q -N ${ftpsite}/dists/${dist}-${arch}/${part}/source/Sources.gz)
+                $wget_cmd -N ${ftpsite}/dists/${dist}-${arch}/${part}/source/Sources.gz)
        done
     done
 else
index adb5f7f96cdbdaa4a1af0d4a1b763efdcfb28bc3..e42a1c64d065273c90ab85804ab2fbb97905eb2e 100755 (executable)
@@ -16,6 +16,6 @@ then
 else
     if [ ! -L Maintainers ]
     then
-       wget -q -O Maintainers ftp://ftp.debian.org/debian/indices/Maintainers
+       $wget_cmd -O Maintainers ftp://ftp.debian.org/debian/indices/Maintainers
     fi
 fi
index ab2bf5e870eb3d712f6abb1f8980185ff0e36d98..a01d19ff4334db6c2807cf23f5472af46b2f3960 100755 (executable)
@@ -12,8 +12,8 @@ do
   echo "retrieve Release(.gpg) $dist-volatile"
   test -d volatile/${dist}-volatile || mkdir -p volatile/${dist}-volatile
   (cd volatile/${dist}-volatile &&
-      wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/Release &&
-      wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/Release.gpg )
+      $wget_cmd -N ${volatile_ftpsite}/dists/${dist}/volatile/Release &&
+      $wget_cmd -N ${volatile_ftpsite}/dists/${dist}/volatile/Release.gpg )
 
     foo=\$arch_${dist//-/_}
     for arch in `eval echo $foo`
@@ -23,11 +23,11 @@ do
        echo retrieve Packages $dist-volatile/$part/$arch
        test -d volatile/${dist}-volatile/${part}/binary-${arch} || mkdir -p volatile/${dist}-volatile/${part}/binary-${arch}
        (cd  volatile/${dist}-volatile/${part}/binary-${arch} &&
-           wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/binary-${arch}/Packages.gz)
+           $wget_cmd -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/binary-${arch}/Packages.gz)
       done
       echo retrieve Contents $dist-volatile/$arch
       (cd volatile/${dist}-volatile &&
-         wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/Contents-${arch}.gz)
+         $wget_cmd -N ${volatile_ftpsite}/dists/${dist}/volatile/Contents-${arch}.gz)
 
     done
     for part in ${parts}
@@ -35,6 +35,6 @@ do
         echo retrieve Sources $dist-volatile/$part
         test -d volatile/${dist}-volatile/${part}/source || mkdir -p volatile/${dist}-volatile/${part}/source
         (cd volatile/${dist}-volatile/$part/source &&
-            wget -q -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/source/Sources.gz)
+            $wget_cmd -N ${volatile_ftpsite}/dists/${dist}/volatile/${part}/source/Sources.gz)
     done
 done
index 7d361fc92b5c024415e7df5c0801b9f1902211c8..a2be69520a9e2e2cdc312bac4e7d132f677d7a00 100755 (executable)
@@ -7,7 +7,7 @@ debtagsdir="$filesdir/debtags"
 test -d ${debtagsdir} || mkdir -p ${debtagsdir}
 cd ${debtagsdir}
 
-wget -q -N http://debtags.alioth.debian.org/tags/vocabulary.gz &&
+$wget_cmd -N http://debtags.alioth.debian.org/tags/vocabulary.gz &&
        gunzip -f vocabulary.gz
 
 cd "$topdir"
index 0816c037f13fcaddfd1130310801958d65b41653..07511f80e8f528f9f6dd4e43ba2a9916d6e1d081 100755 (executable)
@@ -22,7 +22,7 @@ then
            locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e')
            echo "retrieve translated Descs $dist/$part/$lang ($locale)"
             (cd us/${dist}/${part}/i18n &&
-                wget -q -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz)
+                $wget_cmd -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz)
          done
        done
     done