Switch from http.debian.net to ftp.debian.org
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 33-aptsetup
index c38a28e..10f5879 100755 (executable)
@@ -8,10 +8,10 @@
 
 set -e
 
-if ifclass SNAPSHOT ; then
+# use snapshot.debian.org based on build date for release
+if ifclass RELEASE ; then
   set -u
-  perl -pi -e 'BEGIN { $d="'$(date +%Y%m%d)'"; } s#^(\s+)(deb.* )(.*://cdn.*?)(
-  .*)$#$1$2http://snapshot.debian.org/archive/debian/$d/$4#' \
+  perl -pi -e 'BEGIN { $d="'$(date +%Y%m%d)'"; } s#^(\s+)(deb.* )(.*://ftp.debian.org.*?)\s+(\w+)\s+(.*)$#$1$2http://snapshot.debian.org/archive/debian/$d/ $4 $5#' \
     "${target}/etc/apt/sources.list.d/debian.list"
 fi