Package: backupninja Followup-For: Bug #346040
Whoa, sorry about this... I found it. I attached a patch for the current trunk. A. -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-3-686 Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)
--- dup.orig 2006-10-06 20:40:58.000000000 -0400 +++ dup 2007-01-10 13:02:59.000000000 -0500 @@ -7,6 +7,7 @@ getconf options getconf testconnect yes getconf nicelevel 0 +getconf protocol scp setsection gpg getconf password @@ -79,13 +80,19 @@ sftpoptions="$sshoptions" fi -scpoptions="$sshoptions" -[ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit" +if [ "$protocol" != "file" ]; then + scpoptions="$sshoptions" + [ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit" +fi -if [ -z "$sftpoptions" ]; then - execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' --ssh-command 'ssh $sshoptions' " -else - execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' --sftp-command 'sftp $sftpoptions' --ssh-command 'ssh $sshoptions' " +execstr="$options --no-print-statistics " + +if [ "$protocol" != "file" ]; then + if [ -z "$sftpoptions" ]; then + execstr="${execstr}--scp-command 'scp $scpoptions' --ssh-command 'ssh $sshoptions' " + else + execstr="${execstr}--scp-command 'scp $scpoptions' --sftp-command 'sftp $sftpoptions' --ssh-command 'ssh $sshoptions' " + fi fi # deal with symmetric or asymmetric (public/private key pair) encryption @@ -122,7 +129,11 @@ execstr="${execstr}--full " fi -execstr_serverpart="scp://[EMAIL PROTECTED]/$destdir" +if [ "$protocol" == "file" ]; then + execstr_serverpart="$protocol:///$destdir" +else + execstr_serverpart="$protocol://[EMAIL PROTECTED]/$destdir" +fi execstr_clientpart="/" ### SOURCE ###