X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-live;h=a4a1fa83ade60083beece15097c30eca910e767b;hb=ce2488fd462565431f378e96f4dee01b17c7ba9a;hp=a25265acede6e41a81914a9456dc26d25186949f;hpb=130429e20fb319f3ec6a457f3219b7e52216b542;p=grml-live.git diff --git a/grml-live b/grml-live index a25265a..a4a1fa8 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: Sun Nov 25 18:29:07 CET 2007 [mika] +# Latest change: Mon Nov 26 15:13:41 CET 2007 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -15,7 +15,7 @@ export LC_ALL=C # exit on any error: set -e -GRML_LIVE_VERSION='0.0.10' +GRML_LIVE_VERSION='0.0.11' CMDLINE="$0 $@" ISO_DATE="$(date +%Y-%m-%d)" @@ -68,6 +68,7 @@ bailout() { log "------------------------------------------------------------------------------" exit "$EXIT" } +# trap bailout 1 2 3 6 9 14 15 trap bailout 1 2 3 15 # }}} @@ -90,16 +91,15 @@ fi 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 @@ -361,14 +361,15 @@ if [ -d "$CHROOT_OUTPUT/bin" -a -z "$UPDATE" ] ; then ewarn "$CHROOT_OUTPUT exists already, skipping stage 'fai dirinstall'" ; eend 0 else mkdir -p "$CHROOT_OUTPUT" || bailout 5 "Problem with creating $CHROOT_OUTPUT for FAI" + if [ -n "${MIRROR_DIRECTORY}" ] ; then mkdir -p "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}" mount --bind "${MIRROR_DIRECTORY}" "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}" fi + log "Executed FAI command line:" log "fai $VERBOSE -C $GRML_FAI_CONFIG -c$CLASSES -u $HOSTNAME $FAI_ACTION $CHROOT_OUTPUT $FAI_ARGS" fai $VERBOSE -C "$GRML_FAI_CONFIG" -c"$CLASSES" -u "$HOSTNAME" $FAI_ACTION "$CHROOT_OUTPUT" $FAI_ARGS | tee -a $LOGFILE - echo "debug: $?" log "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" > $CHROOT_OUTPUT/etc/grml_version @@ -530,6 +531,11 @@ if [ -f "$BUILD_OUTPUT"/live/grml.squashfs -a -z "$UPDATE" ] ; then 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 @@ -557,6 +563,7 @@ else 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 \