X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=c7f48c17930bd2dc959b25819d5f72e270d41354;hp=db8fd63f76bace47d34b6f8fd78076f574268efb;hb=f9fdf13a9a60e4a9b4f7859a0fe38266dff24abf;hpb=b8872624221cbf7f5d28005eabe2682692a98faf diff --git a/grml-live b/grml-live index db8fd63..c7f48c1 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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 {{{ @@ -16,6 +16,8 @@ export LC_ALL=C 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 @@ -54,6 +56,7 @@ bailout() { [ -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 @@ -229,8 +232,8 @@ fi 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" # }}} @@ -297,6 +300,9 @@ else 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 + chmod 644 $CHROOT_OUTPUT/etc/grml_versio 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}" @@ -377,7 +383,6 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then 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")" @@ -475,7 +480,6 @@ fi [ -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 # }}}