summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-06-26 15:03:36 -0700
committerIvan Kohler <ivan@freeside.biz>2013-06-26 15:03:36 -0700
commitd9098d841ade3bcfe959e82fc984bfa319720ee7 (patch)
tree0b81c5d255fbf15fc0c3f477105f992ddfdab4de /FS
parent8bb40a34c7da1664e451521bea975192b29d497c (diff)
add -b flag for binary mode, RT#23382
Diffstat (limited to 'FS')
-rwxr-xr-xFS/bin/freeside-cdr-sftp_and_import7
1 files changed, 5 insertions, 2 deletions
diff --git a/FS/bin/freeside-cdr-sftp_and_import b/FS/bin/freeside-cdr-sftp_and_import
index 7f2693fcb..77b083416 100755
--- a/FS/bin/freeside-cdr-sftp_and_import
+++ b/FS/bin/freeside-cdr-sftp_and_import
@@ -12,8 +12,8 @@ use FS::cdr;
# parse command line
###
-use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g );
-getopts('c:m:p:r:e:d:v:P:ag');
+use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g $opt_b );
+getopts('c:m:p:r:e:d:v:P:agb');
$opt_e ||= 'csv';
#$opt_e = ".$opt_e" unless $opt_e =~ /^\./;
@@ -168,6 +168,7 @@ sub ftp {
or die "FTP connection to '$hostname' failed.";
$ftp->login($ftp_user, $ftp_pass) or die "FTP login failed: ".$ftp->message;
$ftp->cwd($opt_r) or die "can't chdir to $opt_r\n" if $opt_r;
+ $ftp->binary or die "can't set BINARY mode: ". $ftp->message if $opt_b;
return $ftp;
}
@@ -213,6 +214,8 @@ or FTP and then import them into the database.
-a: use ftp passive mode
+-b: use ftp binary mode
+
-v: set verbosity level; this script only has one level, but it will
be passed as the 'debug' argument to the transport method