From 226940319a0cf52996e61e7fde4d58e766612fb7 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Thu, 8 May 2014 21:19:01 +0200 Subject: Ensure TRACEHOST is set in the "config" part of the script. That avoids surprises if on ever uses a variable elsewhere, and forgets it is set differently than all the rest (only at usage). --- bin/ftpsync | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ftpsync b/bin/ftpsync index 9fbaa1f..f452c5a 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -289,6 +289,9 @@ TRACE=${TRACE:-"project/trace/${MIRRORNAME}"} # Default and required value for Debian mirrors is full. EXTENDEDTRACE=${EXTENDEDTRACE:-"full"} +# The local hostname to be written to the trace file. +TRACEHOST=${TRACEHOST:-$(hostname -f)} + # rsync program RSYNC=${RSYNC:-rsync} # Rsync filter rules. Used to protect various files we always want to keep, even if we otherwise delete @@ -616,7 +619,7 @@ if [ "xtruex" = "x${SYNCSTAGE2}x" ] || [ "xtruex" = "x${SYNCALL}x" ]; then LC_ALL=POSIX LANG=POSIX date -u if [ "xdatex" != "x${EXTENDEDTRACE}x" ]; then echo "Used ftpsync version: ${VERSION}" - echo "Running on host: ${TRACEHOST:-$(hostname -f)}" + echo "Running on host: ${TRACEHOST}" if [ "xfullx" = "x${EXTENDEDTRACE}x" ]; then GLOBALARCHLIST="source amd64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc" -- cgit v1.2.3