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 <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-08-21 13:03:38 +02:00
parent 26f4ae777b
commit f549334226

View file

@ -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