[HELP] FreeRadius and External Script
Luciano Afranllie
listas.luafran at gmail.com
Mon Jan 5 13:26:53 CET 2009
On Mon, Jan 5, 2009 at 10:05 AM, Phibee Network Operation Center
<noc at phibee.net> wrote:
> A.L.M.Buxey at lboro.ac.uk a écrit :
>
> Hi,
>
>
>
> When i start manually the script, we have:
>
> ./example.pl: line 26: use: command not found
> ./example.pl: line 29: syntax error near unexpected token `('
> ./example.pl: line 29: `use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);'
>
>
> how are you running this script manually? looks like you're trying
> to run it as a shell script....
>
> perl ./example.pl
>
>
> Ok, when i start with this command, no error.
>
>
>
> What is the good process for create a small script ?
>
>
> take the example.pl file and modify it to suit your needs...then
> ensure that it is called (ensure that experimental.conf
> is included in the config and that you call the perl
> module where you want it - eg post-auth, auth or such.
>
> alan
> -
>
>
>
> Ok, now i think's that this script are started but i don't understand hit,
> he have a lot of sub but
> sub are not launched.
>
> if i understand, i put all of my perl script into the sub test_call no ?
>
In the example file you have some functions (subs) that are called by
freeradius. This is the list if you did not change perl config:
#func_authenticate = authenticate
#func_authorize = authorize
#func_preacct = preacct
#func_accounting = accounting
#func_checksimul = checksimul
#func_pre_proxy = pre_proxy
#func_post_proxy = post_proxy
#func_post_auth = post_auth
#func_xlat = xlat
#func_detach = detach
These functions are the entry point to the perl module.
test_call is just an example name, you can change it if you want and
of course you can create (and call) more functions to suite your
needs.
You can even change location and name of perl module. Check perl config.
Note: In freeradius 2.1.3 perl config is in raddb/modules/perl
Regards
Luciano
More information about the Freeradius-Users
mailing list