conditional variable assignment
Marlon Duksa
mduksa at gmail.com
Thu Aug 6 23:51:20 CEST 2009
Hi - if there any way to conditionally assign returned variables in users
file? For example:
DEFAULT User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$", Cleartext-Password :=
"csetestp"
Alc-Subsc-ID-Str := "%{NAS-Port-Id}",
Alc-Subsc-Prof-Str := "%{1}",
Now I want to do this:
if %{2} == 'value 1'
then Framed-IP-Address := 21.0.0.2
if %{2} == 'value 2'
then Framed-IP-Address := 31.0.0.2
after this conditional assignment, continue normally:
Alc-SLA-Prof-Str := "%{2}",
Alc-MSAP-Serv-Id := "100",
Alc-MSAP-Policy := "msaps",
Alc-Default-Router := 20.0.0.1,
Framed-IP-Netmask := 255.255.0.0,
Session-Timeout := 600,
Fall-Through = Yes
DEFAULT NAS-Port-Id =~ "^([^:]+):"
Alc-MSAP-Interface := "port-%{1}"
Thanks,
Marlon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090806/837bf21c/attachment.html>
More information about the Freeradius-Users
mailing list