summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2014-05-08 21:19:01 +0200
committerJoerg Jaspert <joerg@debian.org>2014-05-08 21:19:01 +0200
commit226940319a0cf52996e61e7fde4d58e766612fb7 (patch)
tree164baa709cab7fb8595db91aef229ec197be9ece /bin
parent6e0945b1ab346723418d46468a96b328f00c0cce (diff)
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).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ftpsync5
1 files changed, 4 insertions, 1 deletions
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"