[freeside-commits] freeside/FS/bin freeside-sqlradius-reset, 1.14, 1.15

Mark Wells mark at wavetail.420.am
Thu Nov 10 13:40:06 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv22579/FS/bin

Modified Files:
	freeside-sqlradius-reset 
Log Message:
RADIUS groups for svc_broadband, #14695

Index: freeside-sqlradius-reset
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-sqlradius-reset,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- freeside-sqlradius-reset	4 Aug 2009 23:43:48 -0000	1.14
+++ freeside-sqlradius-reset	10 Nov 2011 21:40:04 -0000	1.15
@@ -19,7 +19,7 @@
 my @exports = ();
 if ( @ARGV ) {
   foreach my $exportnum ( @ARGV ) {
-    foreach my $exporttype (qw( sqlradius sqlradius_withdomain phone_sqlradius )) {
+    foreach my $exporttype (qw( sqlradius sqlradius_withdomain ohone_sqlradius broadband_sqlradius )) {
     push @exports, qsearch('part_export', { exportnum  => $exportnum,
                                             exporttype => $exporttype, } );
     }
@@ -34,7 +34,8 @@
     my $icradius_dbh = DBI->connect(
       map { $export->option($_) } qw( datasrc username password )
     ) or die $DBI::errstr;
-    for my $table (qw( radcheck radreply usergroup )) {
+    my $usergroup = $export->option('usergroup') || 'usergroup';
+    for my $table (qw( radcheck radreply ), $usergroup) {
       my $sth = $icradius_dbh->prepare("DELETE FROM $table");
       $sth->execute or die "Can't reset $table table: ". $sth->errstr;
     }



More information about the freeside-commits mailing list