Simplify error printing, if quiet_if_down is set
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
b014c00d24
commit
cbf1b7cf0e
1 changed files with 5 additions and 8 deletions
13
ccollect.sh
13
ccollect.sh
|
@ -335,12 +335,10 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
# Verify source is up and accepting connections before deleting any old backups
|
# Verify source is up and accepting connections before deleting any 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
|
if [ ! -f "${c_quiet_if_down}" ]; then
|
||||||
_exit_err "Source ${source} is not readable. Skipping."
|
|
||||||
else
|
|
||||||
cat "${TMP}"
|
cat "${TMP}"
|
||||||
_exit_err "Error: source ${source} is not readable. Skipping."
|
|
||||||
fi
|
fi
|
||||||
|
_exit_err "Source ${source} is not readable. Skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -375,10 +373,9 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
#
|
#
|
||||||
( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping."
|
( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping."
|
||||||
|
|
||||||
# NEW method as of 0.6:
|
#
|
||||||
# - insert ccollect default parameters
|
# Parameters: ccollect defaults, configuration options, user options
|
||||||
# - insert options
|
#
|
||||||
# - insert user options
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# rsync standard options
|
# rsync standard options
|
||||||
|
|
Loading…
Reference in a new issue