X-Git-Url: http://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F33-aptsetup;h=10f587966e50dc7bec914c19553d6691aa3a2ad0;hp=2ccff06c59ec95ad7ce15e88d40cb02a3c31c45f;hb=96dd50bc39ed1093afa12ed48b327f9773243b12;hpb=d10bf16996ce52adfe8bfd33b8ed60007f44e191 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup b/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup index 2ccff06..10f5879 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup @@ -1,22 +1,19 @@ -#!/bin/sh -# Filename: /etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/33-aptsetup # Purpose: configure Debian package management of live-system # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Mit Okt 24 14:30:39 CEST 2007 [mika] ################################################################################ -set -u set -e -rm -f $target/etc/apt/sources.list - -$ROOTCMD ln -s /etc/apt/sources.list.grml /etc/apt/sources.list - -#if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then -# cp /etc/grml/fai/files/etc/apt/preferences $target/etc/apt/preferences -#fi +# 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.* )(.*://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 ## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2