[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.5-13-g0d7bd11

Andreas B. Mundt andi.mundt at web.de
Sat Apr 14 16:44:50 UTC 2012


The following commit has been merged in the master branch:
commit 0d7bd1175d0471f4110e94753103b0cd14276bf3
Author: Andreas B. Mundt <andi.mundt at web.de>
Date:   Sat Apr 14 18:19:16 2012 +0200

    Apt-cacher-ng for local repository.  Do not change into chroot twice.
    
    Fetch all packages from apt-cacher-ng.  This is imortant when a web
    filter (dansguardian) might block some traffic related to APT
    repositories.

diff --git a/fai/config/class/SERVER_A.var b/fai/config/class/SERVER_A.var
index 9049dc9..3bb9100 100644
--- a/fai/config/class/SERVER_A.var
+++ b/fai/config/class/SERVER_A.var
@@ -56,7 +56,7 @@ DL_RANGE="150 249"
 
 ## Local APT repository for the site (accessible via http).
 ## Set empty to skip this feature.
-APT_REPO_DIR="/var/www/debian"
+APT_REPO_DIR="/var/www/debian/"
 
 # MODULESLIST contains modules that will be loaded by the new system,
 # not during installation these modules will be written to /etc/modules
diff --git a/fai/config/scripts/CLIENT_A/30-APTrepository b/fai/config/scripts/CLIENT_A/30-APTrepository
index 50b283f..beb3e5c 100755
--- a/fai/config/scripts/CLIENT_A/30-APTrepository
+++ b/fai/config/scripts/CLIENT_A/30-APTrepository
@@ -13,9 +13,12 @@ echo "Check if public key is available:"
 if $ROOTCMD wget -O /tmp/DebianLAN.pubkey $APT_URL/DebianLAN.pubkey ; then
     echo -n "Run apt-key and add key: "
     $ROOTCMD apt-key add /tmp/DebianLAN.pubkey
-    ## Key is available, add repository to sources.list:
-    $ROOTCMD ainsl $target/etc/apt/sources.list "## Local APT repository for site-specific packages:"
-    $ROOTCMD ainsl $target/etc/apt/sources.list "deb $APT_URL stable main"
+    ## Key is available, add repository to sources.list.
+    ## Use apt-cacher-ng to serve packages.  This avoids
+    ## potential conflicts with a web filter:
+    ACNG_URL=`echo $APT_URL | sed "s%mainserver%mainserver:3142\/mainserver%"`
+    ainsl $target/etc/apt/sources.list "## Local APT repository for site-specific packages:"
+    ainsl $target/etc/apt/sources.list "deb $ACNG_URL stable main"
 else
     echo "No key available."
 fi

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list