* Set FAI_DEBOOTSTRAP_OPTS="--exclude=dhcp-client,info"
by default.
* Set $SECONDS to unknown if $start_seconds is not set.
- * Improve directory handling for $LOGFILE.
+ * Log closing signs (----...) via bailout to make sure they are
+ always set - even when exiting with an error.
* Check for presence of /bin/zsh before setting default shell in
/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup
* Add new packages to GRML_FULL:
# 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 Oct 28 14:43:27 CET 2007 [mika]
+# Latest change: Sun Oct 28 15:26:10 CET 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
set -e
GRML_LIVE_VERSION='0.0.7'
+CMDLINE="$0 $@"
+ISO_DATE="$(date +%Y-%m-%d)"
# we need root permissions for the build-process:
if [ "$(id -u 2>/dev/null)" != 0 ] ; then
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"
[ -n "$1" ] && EXIT="$1" || EXIT="1"
[ -n "$2" ] && eerror "$2">&2
+ log "------------------------------------------------------------------------------"
exit "$EXIT"
}
trap bailout 1 2 3 15
start_seconds=$(cut -d . -f 1 /proc/uptime)
log "------------------------------------------------------------------------------"
-log "Starting grml-live [${GRML_LIVE_VERSION}] run [$(date)]"
-log "Executed command line: $0 $@"
+log "Starting grml-live [${GRML_LIVE_VERSION}] run on $(date)"
+log "Executed command line: $CMDLINE"
einfo "Logging actions to logfile $LOGFILE"
# }}}
mount --bind "${MIRROR_DIRECTORY}" "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"
fi
fai $VERBOSE -C "$GRML_FAI_CONFIG" -c"$CLASSES" -u "$HOSTNAME" dirinstall "$CHROOT_OUTPUT" $FAI_ARGS | tee -a $LOGFILE
+ 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
umount $CHROOT_OUTPUT/proc 2>/dev/null || /bin/true
umount $CHROOT_OUTPUT/sys 2>/dev/null || /bin/true
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"
cp -a ${TEMPLATE_DIRECTORY}/GRML/* "$BUILD_OUTPUT"/GRML/
# adjust boot splash information:
- ISO_DATE="$(date +%Y-%m-%d)"
RELEASE_INFO="$GRML_NAME $VERSION - Release Codename $RELEASENAME"
RELEASE_INFO="$(cut_string 68 "$RELEASE_INFO")"
RELEASE_INFO="$(extend_string_end 68 "$RELEASE_INFO")"
[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
einfo "Sucessfully finished execution of $PN [running ${SECONDS} seconds]" ; eend 0
log "Sucessfully finished execution of $PN [running ${SECONDS} seconds]"
-log "------------------------------------------------------------------------------"
bailout 0
# }}}