From 7cdd1c7358110aa29778a68a9551b4609f7498ec Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 26 Aug 2009 23:27:59 +0200 Subject: [PATCH] Always remove temporary squashfs stderr file --- debian/changelog | 3 ++- grml-live | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 185d4df..62f6749 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,9 @@ grml-live (0.9.22) UNRELEASED; urgency=low itself succeded but was interrupted during task_configure it should be fine to re-run grml-live with -u/-b options. * Fix usage of exclude option in $SQUASHFS_OPTIONS. + * Always remove temporary squashfs stderr file. - -- Michael Prokop Wed, 26 Aug 2009 23:23:00 +0200 + -- Michael Prokop Wed, 26 Aug 2009 23:27:01 +0200 grml-live (0.9.21) unstable; urgency=low diff --git a/grml-live b/grml-live index f5cafd8..1e9b61c 100755 --- a/grml-live +++ b/grml-live @@ -132,6 +132,7 @@ LIVE_CONF=/etc/grml/grml-live.conf bailout() { rm -f /var/run/fai/fai_softupdate_is_running \ /var/run/fai/FAI_INSTALLATION_IN_PROGRESS + [ -n "$SQUASHFS_STDERR" ] && rm -rf "$SQUASHFS_STDERR" [ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}" [ -n "$1" ] && EXIT="$1" || EXIT="1" [ -n "$2" ] && eerror "$2">&2 @@ -867,20 +868,19 @@ else SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -e initrd.img* vmlinuz*" fi - SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)" + SQUASHFS_STDERR="$(mktemp -t grml-live.XXXXXX)" + log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" if mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs \ - -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_OUTPUT}" ; then + -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_STDERR}" ; then echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module log "Finished execution of stage 'squashfs' [$(date)]" einfo "Finished execution of stage 'squashfs'" ; eend 0 - rm -f "${SQUASHFS_OUTPUT}" else log "There was an error executing stage 'squashfs' [$(date)]:" - log "$(cat $SQUASHFS_OUTPUT)" + log "$(cat $SQUASHFS_STDERR)" eerror "There was an error executing stage 'squashfs':" ; eend 1 - cat "${SQUASHFS_OUTPUT}" - rm -f "${SQUASHFS_OUTPUT}" + cat "${SQUASHFS_STDERR}" bailout fi -- 2.1.4