From f5493342260c6ead1e9b847317df917e0fe71967 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 21 Aug 2009 13:03:38 +0200 Subject: [PATCH] Add rsync arguments for source checking Fix proposed by Nikita Koshikov: -------------------------------------------------------------------------------- [...] [guard] + set -- --archive --delete --numeric-ids --relative --delete-excluded --sparse --stats -v [guard] + '[' -f /etc/ccollect/sources/guard/rsync_options ']' [guard] + read line [guard] + set -- --archive --delete --numeric-ids --relative --delete-excluded --sparse --stats -v --password-file=/etc/ccollect/passwd [guard] + read line [guard] + rsync backup@192.168.1.8::etc Password: In this place it's sit and waiting for password. If I comment out related ccollect code section everything start working as expected. I had to modify this part to be look like: if ! rsync "${source}" "$@" >/dev/null 2>"${TMP}" ; then if [ ! -f "${c_quiet_if_down}" ]; then cat "${TMP}" fi _exit_err "Source ${source} is not readable. Skipping." fi Then checking host activity is passed and backup process running successful. -------------------------------------------------------------------------------- Changed it to "$@" "$source" instead, to be consistent and use options before source. Signed-off-by: Nico Schottelius --- ccollect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccollect.sh b/ccollect.sh index 13ceb33..11998af 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -415,7 +415,7 @@ while [ "${i}" -lt "${no_sources}" ]; do # # Check: source is up and accepting connections (before deleting old backups!) # - if ! rsync "${source}" >/dev/null 2>"${TMP}" ; then + if ! rsync "$@" "${source}" >/dev/null 2>"${TMP}" ; then if [ ! -f "${c_quiet_if_down}" ]; then cat "${TMP}" fi