Support setting aptitude/apt-get options through $DPKG_OPTIONS
authorMichael Prokop <mika@grml.org>
Fri, 8 May 2009 12:29:00 +0000 (14:29 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 8 May 2009 13:33:34 +0000 (15:33 +0200)
chroot-script
config
debian/changelog

index ac11325..3650c6f 100755 (executable)
@@ -17,10 +17,10 @@ set -e # exit on any error
 
 # use aptitude only if it's available
 if [ -x /usr/bin/aptitude ] ; then
 
 # 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
    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
 
    APTUPDATE='apt-get update'
 fi
 
@@ -363,7 +363,12 @@ hostname() {
 # generate initrd/initramfs {{{
 initrd() {
   # assume the first available kernel as our main kernel
 # 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
   KERNELVER=${KERNELIMG#/boot/vmlinuz-}
 
   # generate initrd
diff --git a/config b/config
index 66f8fc9..eae6612 100644 (file)
--- a/config
+++ b/config
@@ -108,6 +108,9 @@ DEBOOTSTRAP='debootstrap'
 # Which debconf-frontend should be used?
 DEBIAN_FRONTEND='noninteractive'
 
 # 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'
 # 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'
index ce8e6b0..aaf9be7 100644 (file)
@@ -1,12 +1,13 @@
 grml-debootstrap (0.27) unstable; urgency=low
 
   * Support setting Debian suite components (like main, contrib,...)
 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).
 
   * 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 <mika@grml.org>  Fri, 08 May 2009 13:53:30 +0200
+ -- Michael Prokop <mika@grml.org>  Fri, 08 May 2009 14:28:27 +0200
 
 grml-debootstrap (0.26) unstable; urgency=low
 
 
 grml-debootstrap (0.26) unstable; urgency=low