diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-05-06 10:40:00 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-06 10:40:00 -0700 |
| commit | 6fe48459fd5e38128b1c0f1d6fdd05dcd745c7bf (patch) | |
| tree | a4631654d31ab26974736ea6d43b86ae825490be | |
| parent | c390c7c32d85ed30a1b533c44b720685f3ceb4f0 (diff) | |
don't abort upgrade if a RADIUS server is unreachable
| -rw-r--r-- | FS/FS/part_export/sqlradius.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index 910346bea..57bbdb439 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -1154,8 +1154,13 @@ sub _upgrade_exporttype { sub import_attrs { my $self = shift; - my $dbh = sqlradius_connect( map $self->option($_), + my $dbh = DBI->connect( map $self->option($_), qw( datasrc username password ) ); + unless ( $dbh ) { + warn "Error connecting to RADIUS server: $DBI::errstr\n"; + return; + } + my $usergroup = $self->option('usergroup') || 'usergroup'; my $error; warn "Importing RADIUS groups and attributes from ".$self->option('datasrc'). |
