type => 'select',
options => [qw( usergroup radusergroup ) ],
},
+ 'skip_provisioning' => {
+ type => 'checkbox',
+ label => 'Skip provisioning records to this database'
+ },
'ignore_accounting' => {
type => 'checkbox',
label => 'Ignore accounting records from this database'
'disconnect_port' => {
label => 'Port to send disconnection requests to, default 1700',
},
- 'disconnect_ignore_error' => {
- label => 'Ignore disconnection request errors',
- type => 'checkbox',
- },
;
$notes1 = <<'END';
sub _export_insert {
my($self, $svc_x) = (shift, shift);
+ return '' if $self->option('skip_provisioning');
+
foreach my $table (qw(reply check)) {
my $method = "radius_$table";
my %attrib = $self->$method($svc_x);
sub _export_replace {
my( $self, $new, $old ) = (shift, shift, shift);
+ return '' if $self->option('skip_provisioning');
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
'disconnect_ssh' => $self->option('disconnect_ssh'),
'svc_acct_username' => $old->username,
'disconnect_port' => $self->option('disconnect_port'),
- 'ignore_error' => $self->option('disconnect_ignore_error'),
);
unless ( ref($err_or_queue) ) {
$dbh->rollback if $oldAutoCommit;
sub _export_suspend {
my( $self, $svc_acct ) = (shift, shift);
+ return '' if $self->option('skip_provisioning');
+
my $new = $svc_acct->clone_suspended;
local $SIG{HUP} = 'IGNORE';
sub _export_unsuspend {
my( $self, $svc_x ) = (shift, shift);
+ return '' if $self->option('skip_provisioning');
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
sub _export_delete {
my( $self, $svc_x ) = (shift, shift);
+ return '' if $self->option('skip_provisioning');
+
my $jobnum = '';
my $usergroup = $self->option('usergroup') || 'usergroup';
'disconnect_ssh' => $self->option('disconnect_ssh'),
'svc_acct_username' => $svc_x->username,
'disconnect_port' => $self->option('disconnect_port'),
- 'ignore_error' => $self->option('disconnect_ignore_error'),
);
return $err_or_queue unless ref($err_or_queue);
if ( $jobnum ) {
I<disconnect_port> - the port (on the nas) to send disconnect requests to (defaults to 1700)
-I<ignore_error> - do not die on error with the disconnect request
-
Note this is NOT the opposite of sqlradius_connect.
=cut
if $error && (@$nas > 1);
$error = "No clients found"
unless @$nas;
- die $error if $error && !$opt{'ignore_error'};
+ die $error if $error;
return '';
}