X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F33-aptsetup;h=c38a28e4d5774370b141d64259462b9c4f58fcd5;hb=7477e438623f7581965a95d82cba282e38fdeb6e;hp=0edf2f22897c50142953e7abceb4ffeeb87c7162;hpb=02b32aa7fe4022fdefc80552539ecba4f1067492;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup b/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup index 0edf2f2..c38a28e 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: Sun Sep 16 23:10:06 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 +if ifclass SNAPSHOT ; 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#' \ + "${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