projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rdiff: start to take advantage of new lib/vserver functionality
[matthijs/upstream/backupninja.git]
/
handlers
/
rdiff
diff --git
a/handlers/rdiff
b/handlers/rdiff
index 9de8650e1a289414d659bddc9036b1b9a36ec7b5..e2ab5e8ac9dabfedd3fea44951a2f99977423d58 100644
(file)
--- a/
handlers/rdiff
+++ b/
handlers/rdiff
@@
-1,3
+1,4
@@
+# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
#
# rdiff-backup handler script for backupninja
# requires rdiff-backup
#
# rdiff-backup handler script for backupninja
# requires rdiff-backup
@@
-92,19
+93,14
@@
check_consistency "destination" "$type" "$user" "$host"
### CHECK CONFIG ###
# See if vservers are configured
### CHECK CONFIG ###
# See if vservers are configured
-if [ "$vservers" = "yes" ]
-then
- if [ ! -d $VROOTDIR ]
- then
- fatal "vservers enabled, but $VROOTDIR does not exist!"
- else
- info "vserver method enabled"
- usevserver=1
- fi
+local usevserver=no
+if [ $vservers_are_available = yes ]; then
+ info "vserver method enabled"
+ usevserver=yes
fi
# check the connection at the source and destination
fi
# check the connection at the source and destination
-if [ "$testconnect" =
= "yes" -o $test
]; then
+if [ "$testconnect" =
"yes" ] || [ "${test}" -eq 1
]; then
test_connection $sourceuser $sourcehost
test_connection $destuser $desthost
fi
test_connection $sourceuser $sourcehost
test_connection $destuser $desthost
fi
@@
-118,7
+114,7
@@
fi
# source specific checks
[ "$include" != "" -o "$vsinclude" != "" ] || fatal "No source includes specified"
# source specific checks
[ "$include" != "" -o "$vsinclude" != "" ] || fatal "No source includes specified"
-#TODO should I test for vsinclude if usevservers=
1
?
+#TODO should I test for vsinclude if usevservers=
yes
?
case $sourcetype in
remote ) execstr_sourcepart="$sourceuser@$sourcehost::/" ;;
local ) execstr_sourcepart="/" ;;
case $sourcetype in
remote ) execstr_sourcepart="$sourceuser@$sourcehost::/" ;;
local ) execstr_sourcepart="/" ;;
@@
-176,7
+172,7
@@
for i in $include; do
done
# vsinclude
done
# vsinclude
-if [ $usevserver ]; then
+if [ $usevserver
= yes
]; then
for vserver in `ls $VROOTDIR|grep -v lost+found`; do
for vi in $vsinclude; do
str="${vi//__star__/*}"
for vserver in `ls $VROOTDIR|grep -v lost+found`; do
for vi in $vsinclude; do
str="${vi//__star__/*}"