From fbf2dd19acaa441025d0beb33b8e17ad3c1d61f0 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 8 May 2009 13:51:16 +0200 Subject: [PATCH] Support setting Debian mirror components --- chroot-script | 8 +++++--- config | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chroot-script b/chroot-script index 2b3e1ef..ac11325 100755 --- a/chroot-script +++ b/chroot-script @@ -47,12 +47,14 @@ stage() { # define chroot mirror {{{ chrootmirror() { [ -n "$KEEP_SRC_LIST" ] && return + [ -z "$COMPONENTS" ] && COMPONENTS='main contrib non-free' + if [ -n "$ISO" ] ; then - echo "deb $ISO $RELEASE main contrib" > /etc/apt/sources.list - [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE main contrib non-free" >> /etc/apt/sources.list + echo "deb $ISO $RELEASE $COMPONENTS" > /etc/apt/sources.list + [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list || /bin/true else if [ -n "$MIRROR" ] ; then - echo "deb $MIRROR $RELEASE main contrib non-free" > /etc/apt/sources.list + echo "deb $MIRROR $RELEASE $COMPONENTS" > /etc/apt/sources.list fi fi } diff --git a/config b/config index bd8dcca..66f8fc9 100644 --- a/config +++ b/config @@ -74,6 +74,10 @@ MIRROR='ftp://ftp.de.debian.org/debian' # squeeze (testing), sid (unstable) RELEASE='lenny' +# define components that should be used within sources.list +# default: +# COMPONENTS='main contrib non-free' + # architecture # if unset the default of the running system (see 'dpkg --print-architecture') will be taken # notice: installing an amd64 system requires a 64bit kernel -- 2.1.4