diff options
Diffstat (limited to 'handlers')
-rw-r--r-- | handlers/Makefile.am | 2 | ||||
-rw-r--r-- | handlers/dup.in | 14 | ||||
-rw-r--r-- | handlers/rdiff.helper.in | 2 | ||||
-rw-r--r-- | handlers/rsync.in | 6 | ||||
-rw-r--r-- | handlers/sh.in | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | handlers/sys.in | 0 |
6 files changed, 17 insertions, 14 deletions
diff --git a/handlers/Makefile.am b/handlers/Makefile.am index c9ad2ba..54155e8 100644 --- a/handlers/Makefile.am +++ b/handlers/Makefile.am @@ -1,5 +1,5 @@ -HANDLERS = dup dup.helper ldap ldap.helper maildir makecd \ +HANDLERS = dup dup.helper maildir makecd \ makecd.helper mysql mysql.helper pgsql pgsql.helper rdiff \ rdiff.helper rsync sh svn sys sys.helper trac tar tar.helper diff --git a/handlers/dup.in b/handlers/dup.in index b58d34d..40f6723 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -155,9 +155,7 @@ else fi ### Cleanup options -if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then - execstr_options="${execstr_options} --extra-clean" -fi +execstr_options="${execstr_options} --extra-clean" ### Temporary directory if [ -n "$tmpdir" ]; then @@ -172,12 +170,10 @@ if [ -n "$tmpdir" ]; then fi ### Archive directory -# duplicity >= 0.6.01 enables the archive_dir by default, let's put it into /var/cache/backupninja/duplicity +# duplicity now enables the archive_dir by default, let's put it into /var/cache/backupninja/duplicity # unless the user has specified it. -if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then - if echo "${options}" | grep -qv -- "--archive-dir" ; then - execstr_options="${execstr_options} --archive-dir /var/cache/backupninja/duplicity" - fi +if echo "${options}" | grep -qv -- "--archive-dir" ; then + execstr_options="${execstr_options} --archive-dir /var/cache/backupninja/duplicity" fi ### Cleanup old backup sets (or not) @@ -279,7 +275,7 @@ fi # remove-all-inc-of-but-n-full : remove increments of older full backups : only keep latest ones if [ "$keep" != "yes" ]; then if [ "$keepincroffulls" != "all" ]; then - if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 9 -a "$duplicity_sub" -ge 10 ]; then + if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 10 ]; then debug "$precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password diff --git a/handlers/rdiff.helper.in b/handlers/rdiff.helper.in index 039799e..1597305 100644 --- a/handlers/rdiff.helper.in +++ b/handlers/rdiff.helper.in @@ -265,7 +265,7 @@ do_rdiff_con() { fi fi else - msgBox "incompatible versions of rdiff-backup" "It looks like rdiff-backup is installed on the remote machine, but it may be an incompatible version with the one installed locally, or something else is amiss.\n\nPlease resolve this problem and then try connecting again.\n\n\nTry connecting again?" + booleanBox "incompatible versions of rdiff-backup" "It looks like rdiff-backup is installed on the remote machine, but it may be an incompatible version with the one installed locally, or something else is amiss.\n\nPlease resolve this problem and then try connecting again.\n\n\nTry connecting again?" if [ $? = 0 ]; then do_rdiff_con else diff --git a/handlers/rsync.in b/handlers/rsync.in index d93411a..6c772e1 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -893,7 +893,7 @@ function set_rsync_options { if [ "$from" == "local" ] || [ "$dest" == "local" ]; then # rsync options for local sources or destinations - rsync_options="$rsync_options" + rsync_options=($rsync_options) fi if [ "$from" == "remote" ] || [ "$dest" == "remote" ]; then @@ -1070,8 +1070,8 @@ for SECTION in $include; do set_dest info "Syncing $SECTION on $dest_path..." - debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path - $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log + debug $nice $rsync $rsync_options $filelist_flag $excludes $batch_option $orig $dest_path + $nice $rsync $rsync_options $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log if [ "$?" != "0" ]; then warning "Rsync error when trying to transfer $SECTION" diff --git a/handlers/sh.in b/handlers/sh.in index b070f3b..384ca52 100644 --- a/handlers/sh.in +++ b/handlers/sh.in @@ -5,4 +5,11 @@ # runs the file /etc/backup.d/scriptname.sh # +# No-op function so that 'when = XXX' can be written as such in +# backup.d/*.sh, i.e. with spaces around the equal sign - as in every +# other backup.d/ file. +function when() { + true +} + [ $test ] || ( . $1 ) diff --git a/handlers/sys.in b/handlers/sys.in index 74133a3..74133a3 100755..100644 --- a/handlers/sys.in +++ b/handlers/sys.in |