# 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: Sun Nov 25 18:29:07 CET 2007 [mika]
+# Latest change: Sun Nov 25 20:08:06 CET 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
log "------------------------------------------------------------------------------"
exit "$EXIT"
}
+# trap bailout 1 2 3 6 9 14 15
trap bailout 1 2 3 15
# }}}
touch $LOGFILE
chown root:adm $LOGFILE
chmod 640 $LOGFILE
-# clean/zero logfile:
+# clean/zero grml-live logfile:
if [ -n "$ZERO_LOGFILE" ] ; then
echo -n > $LOGFILE
fi
+# clean/zero/remove old FAI directory:
if [ -n "$ZERO_FAI_LOGFILE" ] ; then
if [ -d /var/log/fai/"$HOSTNAME" ] ; then
- rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last)"
- rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last-softupdate)"
- rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last-dirinstall)"
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last)"
fi
fi
ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ; eend 0
else
[ -d "$BUILD_OUTPUT"/live ] || mkdir "$BUILD_OUTPUT"/live
+ # make sure we don't leave (even an empty) base.tgz:
+ [ -f "$CHROOT_OUTPUT/base.tgz" ] && rm -f "$CHROOT_OUTPUT/base.tgz"
+
+ # execute squashfs:
+ log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend"
mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend
log "Finished execution of stage 'squashfs' [$(date)]"
einfo "Finished execution of stage 'squashfs'" ; eend 0
mkdir -p "$ISO_OUTPUT" || bailout 6 "Problem with creating $ISO_OUTPUT for stage 'iso build'"
CURRENT_DIR=$(pwd)
cd "$BUILD_OUTPUT" &&
+ log "mkisofs -V grml $VERSION -publisher 'grml-live | grml.org' -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b $BOOT_FILE -o ${ISO_OUTPUT}/${ISO_NAME} ."
mkisofs -V "grml $VERSION" -publisher 'grml-live | grml.org' \
-l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \
-b $BOOT_FILE \