summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2010-10-10 22:42:21 +0200
committerJoerg Jaspert <joerg@debian.org>2010-10-10 22:42:21 +0200
commit54942d8cb4aebf7acdfcb60a4edd23f674393ddb (patch)
tree6daa04504c86a94b12b4e853b5f667592ac0ab8b
parentd6ddf759af1a6c6d79b755ce5570fab29ef23080 (diff)
ftpsync now closes stdin, not attaches to dev/null
and pushes use ssh -f, not ssh ... & Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-xbin/ftpsync4
-rw-r--r--etc/common2
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index ff2536b..139b884 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -408,8 +408,8 @@ fi
# run!)
trap cleanup ERR TERM HUP INT QUIT
-# Start log by redirecting everything there.
-exec >"$LOG" 2>&1 </dev/null
+# Start log by redirecting stdout and stderr there and closing stdin
+exec >"$LOG" 2>&1 <&-
log "Mirrorsync start"
# Look who pushed us and note that in the log.
diff --git a/etc/common b/etc/common
index 5058f9e..4a8b2c5 100644
--- a/etc/common
+++ b/etc/common
@@ -93,7 +93,7 @@ signal () {
# Default normal "fire and forget" push. We background that, we do not care about the mirrors doings
echo "Sending normal push" >> "${LOGDIR}/${MIRROR}.log"
PUSHARGS1="sync:all"
- ssh $SSH_OPTIONS "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log" 2>&1 &
+ ssh -f $SSH_OPTIONS "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log"
elif [ "xstagedx" = "x${PUSHTYPE}x" ] || [ "xmhopx" = "x${PUSHTYPE}x" ]; then
# Want a staged push. Fine, lets do that. Not backgrounded. We care about the mirrors doings.
echo "Sending staged push" >> "${LOGDIR}/${MIRROR}.log"