summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2009-12-31 15:24:40 +0100
committerJoerg Jaspert <joerg@debian.org>2009-12-31 15:24:40 +0100
commit52438f4293c217998f359f617f3055d3039ea63b (patch)
tree32866d0e3001b21987f57dc4045376fbcc5ee0fb
parentbce457d4e1f83d2ce0a80a889cb6462199387c1a (diff)
ftpsync
only set -a argument for runmirrors when it actually has one Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-xbin/ftpsync7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index ce77a21..1af9348 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -476,8 +476,11 @@ function mainroutine() {
if [ x${HUB} = "xtrue" ]; then
# Trigger slave mirrors if we had a push for stage2 or all, or if its mhop
if [ "xtruex" = "x${SYNCSTAGE2}x" ] || [ "xtruex" = "x${SYNCALL}x" ] || [ "xtruex" = "x${SYNCMHOP}x" ]; then
- # We tell runmirrors about the archive we are running on. Might be empty.
- RUNMIRRORARGS="-a ${ARCHIVE}"
+ RUNMIRRORARGS=""
+ if [ -n "${ARCHIVE}" ]; then
+ # We tell runmirrors about the archive we are running on.
+ RUNMIRRORARGS="-a ${ARCHIVE}"
+ fi
# We also tell runmirrors that we are running it from within ftpsync, so it can change
# the way it works with mhop based on that.
RUNMIRRORARGS="${RUNMIRRORARGS} -f"