# 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: Fri Dec 28 18:48:42 CET 2007 [mika]
+# Latest change: Wed Feb 13 19:24:12 CET 2008 [mika]
################################################################################
# read configuration files, set some misc variables {{{
# exit on any error:
set -e
-GRML_LIVE_VERSION='0.0.15'
+GRML_LIVE_VERSION='0.4'
CMDLINE="$0 $@"
ISO_DATE="$(date +%Y-%m-%d)"
}
# }}}
-# command line parsing {{{
+# read local (non-packaged) configuration {{{
+LOCAL_CONFIG=/etc/grml/grml-live.local
+if [ -r "$LOCAL_CONFIG" ] ; then
+ log "Sourcing $LOCAL_CONFIG"
+ . $LOCAL_CONFIG
+else
+ log "No $LOCAL_CONFIG found, not sourcing it"
+ LOCAL_CONFIG=''
+fi
+# }}}
+# command line parsing {{{
while getopts "a:C:c:g:i:o:r:s:t:v:bFhuVz" opt; do
case "$opt" in
a) ARCH="$OPTARG" ;;
specify it on the command line using the -o option."
# }}}
-# read local (non-packaged) configuration {{{
-LOCAL_CONFIG=/etc/grml/grml-live.local
-if [ -r "$LOCAL_CONFIG" ] ; then
- log "Sourcing $LOCAL_CONFIG"
- . $LOCAL_CONFIG
-else
- log "No $LOCAL_CONFIG found, not sourcing it"
- LOCAL_CONFIG=''
-fi
-
-# clean/zero grml-live logfile:
+# clean/zero grml-live logfile {{{
if [ -n "$ZERO_LOGFILE" ] ; then
echo -n > $LOGFILE
fi
+# }}}
-# clean/zero/remove old FAI directory:
+# 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 /var/log/fai/"$HOSTNAME"/last)"
/var/log/fai/"$HOSTNAME"/last-softupdate
fi
fi
-
# }}}
# ask user whether the setup is ok {{{
[ -n "$FAI_ARGS" ] && echo " additional arguments for FAI: $FAI_ARGS"
[ -n "$LOGFILE" ] && echo " Logging to file: $LOGFILE"
[ -n "$VERBOSE" ] && echo " Using VERBOSE mode."
- [ -n "$SQUASHFS_ZLIB" ] && echo " Using ZLIB (instead od LZMA) compression."
+ [ -n "$SQUASHFS_ZLIB" ] && echo " Using ZLIB (instead of LZMA) compression."
[ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation."
[ -n "$BUILD_ONLY" ] && echo " Executing BUILD_ONLY instead of fresh installation or UPDATE."
echo
[ -f "$CHROOT_OUTPUT/base.tgz" ] && rm -f "$CHROOT_OUTPUT/base.tgz"
# execute squashfs:
- log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress"
- mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+ if mksquashfs --help 2>&1 | grep -q -- -no-progress ; then
+ log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress"
+ mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+ else
+ log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend"
+ mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+ fi
log "Finished execution of stage 'squashfs' [$(date)]"
einfo "Finished execution of stage 'squashfs'" ; eend 0
fi