Referencing a module by a ${}-Variable
freeradius-mlist-users at m20.kunterbunt.de
freeradius-mlist-users at m20.kunterbunt.de
Thu Jan 14 09:03:42 CET 2021
Hello all,
I am trying to set up a freeradius server with several mysql databases
for different sets of accounts. The distinguation of the request should
happen via the 'nas' table, which points to the different virtual servers.
So, in the directory "sites-enabled" I have a file defining several
virtual servers:
server wlan {
instance_name = "wlan"
$INCLUDE "../sites-available/instances_include"
}
and within in the "instances_include" I want to refer to a separate
instance of the SQL module:
authorize {
filter_username
filter_password
preprocess
sql_instance_${.instance_name}
auth_log
}
These modules are all defined in "mods-enabled":
sql sql_instance_wlan {
radius_db = "raddb_wlan"
$INCLUDE "../mods-available/sql_instances_include"
}
The problem here is, that the line "sql_instance_${.instance_name}" is
not accepted during server startup:
including files in directory /etc/freeradius/3.0/sites-enabled/
including configuration file /etc/freeradius/3.0/sites-enabled/instances
including configuration file
/etc/freeradius/3.0/sites-enabled/../sites-available/instances_include
/etc/freeradius/3.0/sites-enabled/../sites-available/instances_include[10]:
Parse error after ".instance_name": unexpected token "}"
Errors reading or parsing /etc/freeradius/3.0/radiusd.conf
First I tried to use ${.name2}, which I hoped to refer to the section
name "wlan". When this didn't worked, I defined a separate variable
"instance_name".
I checked the files, that they have standard UNIX line termination and
no additional ctrl characters.
FreeRADIUS Version 3.0.17
Copyright (C) 1999-2017 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
Is there any possibility to refer to a module by a ${} variable?
Thanks for your attention and hopefully your help!
Kind regards,
Michael Sievert
More information about the Freeradius-Users
mailing list