提交 bba165cc 编写于 作者: J Joerg Jaspert

Make timestamping configurable and only let dinstall have it for now

上级 09f7332e
......@@ -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} ##########"
......
......@@ -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
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册