]> git.decadent.org.uk Git - dak.git/commitdiff
Make timestamping configurable and only let dinstall have it for now
authorJoerg Jaspert <joerg@debian.org>
Sat, 2 Jan 2016 13:38:26 +0000 (14:38 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 2 Jan 2016 13:38:41 +0000 (14:38 +0100)
config/debian/common
config/debian/dinstall.variables
config/debian/vars

index 0754159ea93b41e7fbd0cd50dce0627def7d429c..0177f1f6fcfd8e1a14b94f32d69a5975607946e1 100644 (file)
@@ -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} ##########"
index 2587b2a8e760ac6c3f959b868950e6f447c998b1..000697fa71ec96dd6f0282972dbb491a9abe0b58 100644 (file)
@@ -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
index d134d9c4faa4c730647ac717bbb1b473e79e62a4..3a7483cb2ea7638c9efa689d6d93c770f4f85983 100644 (file)
@@ -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)