pass parameters to rlm_perl script in a redundant setup

Alan DeKok aland at deployingradius.com
Sat Mar 21 19:31:16 CET 2020


On Mar 21, 2020, at 2:05 PM, Cornelius Kölbel via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> The redundant and redundant-load-balance setting is totally awesome.
> I would like to run perl modules in a redundant configuration.
> 
> redundant {
>   perl-auth-A
>   perl-auth-B
> }
> 
> With both being
> 
> perl perl-auth-A {
>    filename = /my/perl/script.pl
> }
> 
> perl perl-auth-B {
>    filename = /my/perl/script.pl
> }
> 
> basically the same script but with two different configurations.

  What do you mean by "different configurations"?  If it's the same file, there is no different configuration.

> So I am wondering how it is even possible to pass the information to
> the script, if it would run as "A" or "B".

  Yes... the files mods-available/perl describes how attributes are passed to the module.

> I could not figure to add some information maybe using update-control.

  Those attributes are in %RAD_CHECK.

> So I am wondering if it is possible in some way to do
> 
> perl perl-auth-A {
>    filename = /my/perl/script.pl
>    option = A
> }

  No.  If that was possible, it would be documented.

  And even if it was possible, how would "option" be passed to the Perl script?

> Currently I need to create a copy of the perl script and do:
> 
> perl perl-auth-A {
>    filename = /my/perl/script-A.pl
> }

  That's simple, and it works.

  Alan DeKok.




More information about the Freeradius-Users mailing list