X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;fp=grml-live;h=7dc20f8e5cc6a73dd48589d7efb4a28ecd0071fd;hp=ce6cb35d6c3dcea6ba8242b9a833c0e2527b2b13;hb=8772657eafe9541d7879b65ff3750903f200cb25;hpb=798b55321d840b470c8a948348993aad88db3ffd diff --git a/grml-live b/grml-live index ce6cb35..7dc20f8 100755 --- a/grml-live +++ b/grml-live @@ -579,7 +579,8 @@ if [ -n "$CONFIG" ] ; then fi fi -start_seconds=$(cut -d . -f 1 /proc/uptime) +SECONDS=unknown +start_seconds="$(date +%s)" log "------------------------------------------------------------------------------" log "Starting grml-live [${GRML_LIVE_VERSION}] run on $(date)" log "Using local config file: $LOCAL_CONFIG" @@ -1692,7 +1693,10 @@ fi # }}} # finalize {{{ -[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown" +if [ -n "${start_seconds}" ] ; then + end_seconds="$(date +%s)" + SECONDS="$(( end_seconds - start_seconds ))" +fi log "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]" dpkg_to_db # make sure we catch the last log line as well, therefore execute between log + einfo