From aad526af3708cc6796d906eb877253435aa0c29c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 8 May 2009 14:29:00 +0200 Subject: [PATCH] Support setting aptitude/apt-get options through $DPKG_OPTIONS --- chroot-script | 11 ++++++++--- config | 3 +++ debian/changelog | 5 +++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/chroot-script b/chroot-script index ac11325..3650c6f 100755 --- a/chroot-script +++ b/chroot-script @@ -17,10 +17,10 @@ set -e # exit on any error # use aptitude only if it's available if [ -x /usr/bin/aptitude ] ; then - APTINSTALL='aptitude -y --without-recommends install ' + APTINSTALL="aptitude -y --without-recommends install $DPKG_OPTIONS" APTUPDATE='aptitude update' else - APTINSTALL='apt-get --force-yes -y install' + APTINSTALL="apt-get --force-yes -y install $DPKG_OPTIONS" APTUPDATE='apt-get update' fi @@ -363,7 +363,12 @@ hostname() { # generate initrd/initramfs {{{ initrd() { # assume the first available kernel as our main kernel - KERNELIMG=$(ls -1 /boot/vmlinuz-* | head -1) + KERNELIMG=$(ls -1 /boot/vmlinuz-* 2>/dev/null | head -1) + if [ -z "$KERNELIMG" ] ; then + echo 'No kernel image found, skipping initrd stuff.'>&2 + return + fi + KERNELVER=${KERNELIMG#/boot/vmlinuz-} # generate initrd diff --git a/config b/config index 66f8fc9..eae6612 100644 --- a/config +++ b/config @@ -108,6 +108,9 @@ DEBOOTSTRAP='debootstrap' # Which debconf-frontend should be used? DEBIAN_FRONTEND='noninteractive' +# execute aptitude/apt-get with any special options? +# DPKG_OPTIONS='-o APT::Get::AllowUnauthenticated=true -o aptitude::Cmdline::ignore-trust-violations=yes' + # The single steps/stages of grml-deboostrap are stored inside /var/cache/grml-debootstrap # by default. Use another directory instead? # STAGES='/var/cache/grml-debootstrap' diff --git a/debian/changelog b/debian/changelog index ce8e6b0..aaf9be7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,13 @@ grml-debootstrap (0.27) unstable; urgency=low * Support setting Debian suite components (like main, contrib,...) - so it's possible to use a simple 'main' mirror. + through COMPONENTS so it's possible to use a simple 'main' mirror. + * Support setting aptitude/apt-get options through $DPKG_OPTIONS. * Bugfix: make sure to ignore /dev/md* devices if not using SW-RAID * Bugfix: do not fail in chrootmirror() when using $ISO variable. * Bump Standard Version to 3.8.1 (no further changes). - -- Michael Prokop Fri, 08 May 2009 13:53:30 +0200 + -- Michael Prokop Fri, 08 May 2009 14:28:27 +0200 grml-debootstrap (0.26) unstable; urgency=low -- 2.1.4