# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
-# Latest change: Sat Oct 06 18:28:57 CEST 2007 [mika]
+# Latest change: Mit Okt 10 09:38:42 CEST 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
[ -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
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
# }}}
ERROR=''
if [ -r "/var/log/fai/dirinstall/$HOSTNAME/software.log" ] ; then
grep 'dpkg: error processing' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=1
+ grep 'E: Method http has died unexpectedly!' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=2
+ grep 'ERROR: chroot' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=3
fi
if [ -r "/var/log/fai/dirinstall/$HOSTNAME/shell.log" ] ; then
fi
if [ -n "$ERROR" ] ; then
- log "There was an error during execution of stage 'fai dirinstall' [$(date)]"
+ log "There was an error [${ERROR}] during execution of stage 'fai dirinstall' [$(date)]"
eerror "There was an error during execution of stage 'fai dirinstall'"
echo " Check out /var/log/fai/dirinstall/$HOSTNAME/ for details. [exit ${ERROR}]"
- eend 1 ; exit 1
+ eend 1
+ bailout 1
else
log "Finished execution of stage 'fai dirinstall' [$(date)]"
einfo "Finished execution of stage 'fai dirinstall'"
# 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
- # 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 "$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
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