# exit on any error:
set -e
-GRML_LIVE_VERSION='0.9.5'
+GRML_LIVE_VERSION='0.9.7'
PN="$(basename $0)"
CMDLINE="$0 $@"
ISO_DATE="$(date +%Y-%m-%d)"
-h display short usage information and exit
-i <iso_name> name of ISO
-o <output_directory> main output directory of the build process
+ -q skip mksquashfs
-r release name
-s <suite> Debian suite; values: etch, lenny, sid
-t <template_directory> place of the templates
# }}}
# command line parsing {{{
-while getopts "a:C:c:g:i:o:r:s:t:v:bFuVz" opt; do
+while getopts "a:C:c:g:i:o:r:s:t:v:bFuqVz" opt; do
case "$opt" in
a) ARCH="$OPTARG" ;;
b) BUILD_ONLY=1 ;;
BUILD_OUTPUT="$OUTPUT/grml_cd"
ISO_OUTPUT="$OUTPUT/grml_isos"
;;
+ q) SKIP_MKSQUASHFS=1 ;;
r) RELEASENAME="$OPTARG" ;;
s) SUITE="$OPTARG" ;;
t) TEMPLATE_DIRECTORY="$OPTARG";;
[ -n "$SQUASHFS_OPTIONS" ] && echo " Using SQUASHFS_OPTIONS ${SQUASHFS_OPTIONS}"
[ -n "$VERBOSE" ] && echo " Using VERBOSE mode."
[ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation."
+ [ -n "$SKIP_MKSQUASHFS" ] && echo " Skipping creation of SQUASHFS file."
[ -n "$BUILD_ONLY" ] && echo " Executing BUILD_ONLY instead of fresh installation or UPDATE."
echo
echo -n "Is this ok for you? [y/N] "
rm -rf "$CHROOT_OUTPUT"/var/log/fai/*
fi
+ # make sure we don't leave any mounts - FAI doesn't remove them always
umount $CHROOT_OUTPUT/proc 2>/dev/null || /bin/true
umount $CHROOT_OUTPUT/sys 2>/dev/null || /bin/true
+ umount $CHROOT_OUTPUT/dev/pts 2>/dev/null || /bin/true
+ umount $CHROOT_OUTPUT/dev 2>/dev/null || /bin/true
+
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"
# notice: 'fai dirinstall' does not seem to exit appropriate, so:
if [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -z "$UPDATE" -a -z "$BUILD_ONLY" ] ; then
log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'"
ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ; eend 0
+elif [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -n "$SKIP_MKSQUASHFS" ] ; then
+ log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested"
+ ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested" ; eend 0
else
[ -d "$BUILD_OUTPUT"/live ] || mkdir "$BUILD_OUTPUT"/live
# make sure we don't leave (even an empty) base.tgz:
CURRENT_DIR=$(pwd)
if cd "$BUILD_OUTPUT" ; then
- 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' \
+ log "mkisofs -V '${GRML_NAME} ${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_NAME} ${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}" . ; RC=$?