# 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 Jan 20 22:38:18 CET 2008 [mika]
+# Latest change: Sat Feb 09 19:29:02 CET 2008 [mika]
################################################################################
-# main initialization setup, set some misc variables {{{
+# read configuration files, set some misc variables {{{
export LANG=C
export LC_ALL=C
# exit on any error:
set -e
-GRML_LIVE_VERSION='0.2'
+GRML_LIVE_VERSION='0.3'
CMDLINE="$0 $@"
ISO_DATE="$(date +%Y-%m-%d)"
log "No $LOCAL_CONFIG found, not sourcing it"
LOCAL_CONFIG=''
fi
-
-# 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 /var/log/fai/"$HOSTNAME"/last)"
- rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-dirinstall)"
- rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-softupdate)"
- rm -f /var/log/fai/"$HOSTNAME"/last \
- /var/log/fai/"$HOSTNAME"/last-dirinstall \
- /var/log/fai/"$HOSTNAME"/last-softupdate
- fi
-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."
# }}}
+# 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 /var/log/fai/"$HOSTNAME"/last)"
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-dirinstall)"
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-softupdate)"
+ rm -f /var/log/fai/"$HOSTNAME"/last \
+ /var/log/fai/"$HOSTNAME"/last-dirinstall \
+ /var/log/fai/"$HOSTNAME"/last-softupdate
+ fi
+fi
+# }}}
+
# ask user whether the setup is ok {{{
if [ -z "$FORCE" ] ; then
echo
[ -f "$CHROOT_OUTPUT/base.tgz" ] && rm -f "$CHROOT_OUTPUT/base.tgz"
# execute squashfs:
- if mksquashfs --help 2>&1 | grep -- -no-progress ; then
+ 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