diff options
author | ivan <ivan> | 2002-07-02 14:22:21 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-07-02 14:22:21 +0000 |
commit | d5ae9f38bdea9e3de50f76aa8caf06956b4fb706 (patch) | |
tree | 83f67223c8979b21fe179f0769bd9c4c85d53ad1 | |
parent | 0d9e6fc32b9fc3b3a05c2bf0446ee57d484e79a9 (diff) |
working textradius export
-rw-r--r-- | FS/FS/part_export/textradius.pm | 22 |
1 files changed, 14 insertions, 8 deletions
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; |