begin to implement backup to a host
This commit is contained in:
parent
923b3a387a
commit
eef2d55c61
1 changed files with 11 additions and 6 deletions
15
ccollect.sh
15
ccollect.sh
|
@ -14,8 +14,8 @@ CPREEXEC="${CDEFAULTS}/pre_exec"
|
||||||
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
||||||
|
|
||||||
TMP=$(mktemp "/tmp/$(basename $0).XXXXXX")
|
TMP=$(mktemp "/tmp/$(basename $0).XXXXXX")
|
||||||
VERSION=0.6.3
|
VERSION=0.7.0
|
||||||
RELEASE="2007-09-XX"
|
RELEASE="2008-09-XX"
|
||||||
HALF_VERSION="ccollect ${VERSION}"
|
HALF_VERSION="ccollect ${VERSION}"
|
||||||
FULL_VERSION="ccollect ${VERSION} (${RELEASE})"
|
FULL_VERSION="ccollect ${VERSION} (${RELEASE})"
|
||||||
|
|
||||||
|
@ -334,10 +334,15 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# destination _must_ be a directory
|
# destination can be anything rsync supports
|
||||||
#
|
#
|
||||||
if [ ! -d "${c_dest}" ]; then
|
if [ ! -f "${c_dest}" ]; then
|
||||||
_exit_err "Destination ${c_dest} is not a directory. Skipping."
|
_exit_err "Destination ${c_dest} is not a file. Skipping."
|
||||||
|
else
|
||||||
|
destination=$(cat "${c_dest}"); ret=$?
|
||||||
|
if [ "${ret}" -ne 0 ]; then
|
||||||
|
_exit_err "Destination ${c_dest} is not readable. Skipping."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue