X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=81fc13278f1555398a1aba9302dead2aeef17c31;hp=ee6fbb0f037dcde35a0308614c6be0510733ead3;hb=7ab56e7053ae81a293d7eb905dbd288f6a009411;hpb=62bac19425425e3f5d8481563d1dc6f2caeaf73e diff --git a/chroot-script b/chroot-script index ee6fbb0..81fc132 100644 --- a/chroot-script +++ b/chroot-script @@ -4,12 +4,13 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Die Apr 10 11:11:02 CEST 2007 [mika] +# Latest change: Don Apr 12 11:55:23 CEST 2007 [mika] ################################################################################ set -e # exit on any error -. /etc/debootstrap/config || exit 1 +. /etc/debootstrap/config || exit 1 +. /etc/debootstrap/variables || exit 1 [ -r /proc/1 ] || mount -t proc none /proc @@ -23,7 +24,7 @@ fi # helper functions {{{ stage() { if grep -q done "$STAGES/$1" 2>/dev/null ; then - ewarn "Notice: stage $1 has been executed already, skipping execution therefore." ; eend 0 + echo " * Notice: stage $1 has been executed already, skipping execution therefore." return 1 else echo "$2" > "$STAGES/$1" @@ -95,6 +96,15 @@ mkinitrd() { # install kernel packages {{{ kernel() { + # do not override $KERNEL if set via config file + if [ -z "$KERNEL" ] ; then + if [ "$ARCH" = 'i386' ] ; then + KERNEL='2.6-686' + elif [ "$ARCH" = 'amd64' ] ; then + KERNEL='2.6-amd64' + fi + fi + if [ -n "$KERNEL" ] ; then apt-get update if [ "$RELEASE" = 'sarge' ] ; then