# 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 Sep 29 10:44:26 CEST 2007 [mika]
+# Latest change: Thu Oct 04 22:16:28 CEST 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
exit 1
fi
+if [ -r /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ] ; then
+ echo "/usr/sbin/fai already running or was aborted before."&>2
+ echo "You may remove /var/run/fai/FAI_INSTALLATION_IN_PROGRESS and try again.">&2
+ exit 1
+fi
+
# make sure they are not set by default
VERBOSE=''
FORCE=''
[ -n "$RELEASENAME" ] || RELEASENAME="grml-live rocks"
[ -n "$GRML_NAME" ] || GRML_NAME='grml'
-[ -n "$LOGDIR" ] || LOGDIR="/var/log/fai/dirinstall/$HOSTNAME"
-[ -d "$LOGDIR" ] || mkdir -p $LOGDIR
-LOGFILE="$LOGDIR/grml-live.conf"
+[ -n "$LOGDIR" ] || LOGDIR="/var/log/"
+LOGFILE="$LOGDIR/grml-live.log"
# }}}
# some important functions {{{
[ -n "$BUILD_TARGET" ] && echo " build target: $BUILD_TARGET"
[ -n "$ISO_TARGET" ] && echo " ISO target: $ISO_TARGET"
[ -n "$GRML_NAME" ] && echo " grml name: $GRML_NAME"
+ [ -n "$RELEASENAME" ] && echo " release name: $RELEASENAME"
[ -n "$VERSION" ] && echo " grml version: $VERSION"
[ -n "$SUITE" ] && echo " Debian suite: $SUITE"
[ -n "$BOOT_METHOD" ] && echo " Boot method: $BOOT_METHOD"
# booting stuff:
mkdir -p "$BUILD_TARGET"/boot/isolinux
cp /boot/memtest86+.bin "$BUILD_TARGET"/boot/isolinux/memtest
- cp "$CHROOT_TARGET"/boot/initrd* "$BUILD_TARGET"/boot/isolinux/initrd.gz
+ # do not keep the initrd inside the chroot, let's save space instead:
+ mv "$CHROOT_TARGET"/boot/initrd* "$BUILD_TARGET"/boot/isolinux/initrd.gz
cp "$CHROOT_TARGET"/boot/vmlinuz* "$BUILD_TARGET"/boot/isolinux/linux26
cp /usr/lib/syslinux/chain.c32 "$BUILD_TARGET"/boot/isolinux/
cp /usr/lib/syslinux/isolinux.bin "$BUILD_TARGET"/boot/isolinux/
# create md5sum file:
( cd $BUILD_TARGET/GRML &&
-find .. -type f -not -name md5sums -exec md5sum {} \; > md5sums )
+find .. -type f -not -name md5sums -not -name isolinux.bin -exec md5sum {} \; > md5sums )
# }}}
# ISO_TARGET - mkisofs {{{
[ -n "$ISO_TARGET" ] || ISO_TARGET="$TARGET/grml_isos"
-[ -n "$ISO_NAME" ] || ISO_NAME="$GRML_NAME_${VERSION}.iso"
+[ -n "$ISO_NAME" ] || ISO_NAME="${GRML_NAME}_${VERSION}.iso"
if [ "$BOOT_METHOD" = "isolinux" ] ; then
BOOT_FILE="boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"