summaryrefslogtreecommitdiff
path: root/etc/common
diff options
context:
space:
mode:
Diffstat (limited to 'etc/common')
-rw-r--r--etc/common5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/common b/etc/common
index de3cfac..49ca038 100644
--- a/etc/common
+++ b/etc/common
@@ -236,8 +236,9 @@ savelog() {
# Return rsync version
rsync_protocol() {
RSYNC_VERSION="$(${RSYNC} --version)"
- if [[ $RSYNC_VERSION =~ (protocol[ ]+version[ ]+([0-9]+)) ]]; then
+ RSYNC_REGEX="(protocol[ ]+version[ ]+([0-9]+))"
+ if [[ ${RSYNC_VERSION} =~ ${RSYNC_REGEX} ]]; then
echo ${BASH_REMATCH[2]}
fi
- unset RSYNC_VERSION
+ unset RSYNC_VERSION RSYNC_REGEX
}