X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-live;h=36359b0f3ac17a0f12365362bc99a491a151aaac;hb=551eb6fc403775cd139742dcf31b7feca9c2e49c;hp=976f73dc6d9b47da18dc45abf494b961506e73df;hpb=93358ab25a3c8465b39290a05e3b85ef1f891d37;p=grml-live.git diff --git a/grml-live b/grml-live index 976f73d..36359b0 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # 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: Thu Oct 04 22:16:28 CEST 2007 [mika] +# Latest change: Sat Oct 06 18:28:57 CEST 2007 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -152,14 +152,14 @@ http://grml.org/bugs/ # command line parsing {{{ -while getopts "c:g:i:r:s:t:v:FhV" opt; do +while getopts "c:g:i:o:r:s:t:v:FhV" opt; do case "$opt" in c) CLASSES="$OPTARG" ;; g) GRML_NAME="$OPTARG" ;; i) ISO_NAME="$OPTARG" ;; r) RELEASENAME="$OPTARG" ;; s) SUITE="$OPTARG" ;; - t) TEMPLATE_DIRECTORY="$OPTARG" + t) TEMPLATE_DIRECTORY="$OPTARG";; o) OUTPUT="$OPTARG" CHROOT_OUTPUT="$OUTPUT/grml_chroot" BUILD_OUTPUT="$OUTPUT/grml_cd" @@ -198,6 +198,7 @@ if [ -z "$FORCE" ] ; then [ -n "$VERSION" ] && echo " grml version: $VERSION" [ -n "$SUITE" ] && echo " Debian suite: $SUITE" [ -n "$BOOT_METHOD" ] && echo " Boot method: $BOOT_METHOD" + [ -n "$TEMPLATE_DIRECTORY" ] && echo " Template files: $TEMPLATE_DIRECTORY" [ -n "$FAI_ARGS" ] && echo " additional arguments for FAI: $FAI_ARGS" [ -n "$VERBOSE" ] && echo " Using VERBOSE mode." echo @@ -241,9 +242,8 @@ if [ -n "$SUITE" ] ; then sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $LIVE_CONF sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list - DIST='\"etch\|=\"stable=\"lenny=\"testing=\"sid=\"unstable' - sed -i "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" $LIVE_CONF - sed -i "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" /etc/grml/fai/make-fai-nfsroot.conf + sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $LIVE_CONF + sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" /etc/grml/fai/make-fai-nfsroot.conf fi # }}} @@ -300,15 +300,25 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then else # booting stuff: mkdir -p "$BUILD_OUTPUT"/boot/isolinux - cp /boot/memtest86+.bin "$BUILD_OUTPUT"/boot/isolinux/memtest - # do not keep the initrd inside the chroot, let's save space instead: - mv "$CHROOT_OUTPUT"/boot/initrd* "$BUILD_OUTPUT"/boot/isolinux/initrd.gz + cp /boot/memtest86+.bin "$BUILD_OUTPUT"/boot/isolinux/memtest + + # if we don't have an initrd we a) can't boot and b) there was an error + # during build, so check for the file: + if [ -f "$CHROOT_OUTPUT"/boot/initrd* ] ; then + cp "$CHROOT_OUTPUT"/boot/initrd* "$BUILD_OUTPUT"/boot/isolinux/initrd.gz + else + log "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting" + eerror "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting" ; eend 1 + bailout 10 + fi + cp "$CHROOT_OUTPUT"/boot/vmlinuz* "$BUILD_OUTPUT"/boot/isolinux/linux26 cp /usr/lib/syslinux/chain.c32 "$BUILD_OUTPUT"/boot/isolinux/ cp /usr/lib/syslinux/isolinux.bin "$BUILD_OUTPUT"/boot/isolinux/ cp /usr/lib/syslinux/memdisk "$BUILD_OUTPUT"/boot/isolinux/ cp /usr/lib/syslinux/menu.c32 "$BUILD_OUTPUT"/boot/isolinux/ + [ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' if ! [ -d "${TEMPLATE_DIRECTORY}"/boot ] ; then log "${TEMPLATE_DIRECTORY}/boot does not exist. Exiting." eerror "${TEMPLATE_DIRECTORY}/boot does not exist. Exiting." ; eend 1