[freeside-devel] current cvs

Adam Rose adamr at eaze.net
Thu Feb 22 13:54:57 PST 2001


I see how you plan to currently implement ICRADIUS.  Has the dbdef-create
script for adding columns (specifically radius attributes) been updated
for postgres?  It still seems to have mysql info implemented in it.  Is
there a workaround for adding the radius attributes to freeside on
postgresql or does it need to be done manually?

I will be glad to try to patch the current adding of radius attributes
with dbdef-create and dbdef.pm but would like to know what I may be facing
since(according to the mailing lists) this appears to be an issue.

Thanks

On Wed, 21 Feb 2001, ivan wrote:

> On Wed, Feb 21, 2001 at 05:01:46PM -0600, Adam Rose wrote:
> > How are planing to implement Postgres with ICRadius since freeside is
> > going toward using transactions.  Just want to see where I can
> > help.
> 
> bin/svc_acct.export will need a small fix (checked into CVS) - with this,
> you specify your local (MySQL) data source, username and password in an
> icradius_secrets configuration file, and Freeside will export to this
> local database and then copy the files to the external icradiusmachines,
> as before.
> 
> ivan at rootwood:~/freeside_current/bin$ cvs diff -u svc_acct.export 
> Index: svc_acct.export
> ===================================================================
> RCS file: /home/cvs/cvsroot/freeside/bin/svc_acct.export,v
> retrieving revision 1.16
> diff -u -r1.16 svc_acct.export
> --- svc_acct.export     2000/07/06 13:23:29     1.16
> +++ svc_acct.export     2001/02/21 23:30:42
> @@ -64,6 +64,7 @@
>  use vars qw($conf);
>  use Fcntl qw(:flock);
>  use IO::Handle;
> +use DBI;
>  use FS::Conf;
>  use FS::SSH qw(scp ssh);
>  use FS::UID qw(adminsuidsetup datasrc dbh);
> @@ -98,8 +99,13 @@
>  my $icradius_mysqlsource =
>    $conf->config('icradius_mysqlsource') || "/usr/local/var/freeside"
>      if $icradiusmachines;
> -my $icradius_dbh = dbh; #could eventually get it from a config file if you're
> -                        #not running MySQL for your Freeside database
> +my $icradius_dbh;
> +if ( $icradiusmachines && $conf->exists('icradius_secrets') ) {
> +  $icradius_dbh = DBI->connect($conf->config('icradius_secrets'))
> +    or die $DBI::errstr;;
> +} else {
> +  $icradius_dbh = dbh;
> +}
>  
>  my $textradiusprepend = $conf->config('textradiusprepend');
>  
> 

-- 
Adam Rose
Systems Programmer/Jr. Systems/Network Administrator
adamr at eaze.net






More information about the freeside-devel mailing list