From: Joerg Jaspert Date: Sat, 2 Jan 2016 13:38:26 +0000 (+0100) Subject: Make timestamping configurable and only let dinstall have it for now X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=bba165ccfeb6a260bba035a16ba4f0e78392fa81;p=dak.git Make timestamping configurable and only let dinstall have it for now --- diff --git a/config/debian/common b/config/debian/common index 0754159e..0177f1f6 100644 --- a/config/debian/common +++ b/config/debian/common @@ -347,7 +347,11 @@ function stage() { # Now we should make sure that we have a usable ${PROGRAM}.log, so # append the $STAGEFILE.log to it. - /usr/bin/ts "%b %d %H:%M:%S ${HOSTNAME} ${PROGRAM}[$$]: ${FUNC} " < "${STAGEFILE}.log" + if [[ ${TIMESTAMP} == true ]]; then + /usr/bin/ts "%b %d %H:%M:%S ${HOSTNAME} ${PROGRAM}[$$]: ${FUNC} " < "${STAGEFILE}.log" + else + cat "${STAGEFILE}.log" + fi rm -f "${STAGEFILE}.log" log "########## ${PROGRAM} END: ${FUNC} ##########" diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index 2587b2a8..000697fa 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -55,3 +55,6 @@ done # Common wget options wgetopts="-t2 -T20 -q -N --ca-directory=/etc/ssl/ca-debian" + +# dinstall wants timestamps added to stage logs +TIMESTAMP=true diff --git a/config/debian/vars b/config/debian/vars index d134d9c4..3a7483cb 100644 --- a/config/debian/vars +++ b/config/debian/vars @@ -44,6 +44,9 @@ LOCK_DAILY="${lockdir}/daily.lock" LOCK_UNCHECKED="${lockdir}/unchecked.lock" LOCK_STOP="${lockdir}/archive.stop" +# By default, add no timestamps to stage logs +TIMESTAMP=false + # And the following types of cronscripts exists declare -lr POSSIBLEARGS='+(unchecked|dinstall|hourly|daily|weekly|monthly|yearly)' declare -r HOSTNAME=$(hostname -s)