From: ivan Date: Tue, 2 Jul 2002 14:22:21 +0000 (+0000) Subject: working textradius export X-Git-Tag: freeside_1_4_0_beta1~21 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d5ae9f38bdea9e3de50f76aa8caf06956b4fb706 working textradius export --- diff --git a/FS/FS/part_export/textradius.pm b/FS/FS/part_export/textradius.pm index 450a0e57b..1492f2672 100644 --- a/FS/FS/part_export/textradius.pm +++ b/FS/FS/part_export/textradius.pm @@ -126,10 +126,13 @@ sub textradius_download { $rsync->exec( { src => "$user\@$host:$users", dest => $dest, - } ) or die "error downloading $user\@$host:$users : ". - 'exit status: '. $rsync->status. ', '. - 'STDERR: '. join(" / ", $rsync->err). ', '. - 'STDOUT: '. join(" / ", $rsync->out); + } ); # true/false return value from exec is not working, alas + if ( $rsync->err ) { + die "error downloading $user\@$host:$users : ". + 'exit status: '. $rsync->status. ', '. + 'STDERR: '. join(" / ", $rsync->err). ', '. + 'STDOUT: '. join(" / ", $rsync->out); + } $dest; } @@ -148,10 +151,13 @@ sub textradius_upload { $rsync->exec( { src => "$dir/users", dest => "$user\@$host:$users", - } ) or die "error uploading to $user\@$host:$users : ". - 'exit status: '. $rsync->status. ', '. - 'STDERR: '. join(" / ", $rsync->err). ', '. - 'STDOUT: '. join(" / ", $rsync->out); + } ); # true/false return value from exec is not working, alas + if ( $rsync->err ) { + die "error uploading to $user\@$host:$users : ". + 'exit status: '. $rsync->status. ', '. + 'STDERR: '. join(" / ", $rsync->err). ', '. + 'STDOUT: '. join(" / ", $rsync->out); + } flock(LOCK,LOCK_UN); close LOCK;