Version 2.1.11 has been released

Stefan Winter stefan.winter at restena.lu
Tue Jun 21 11:43:54 CEST 2011


Hi,

a similar issue with the config parser here...

The following worked nicely in 2.1.10, but barks with "Unexpected text
else" (and with the obvious change to elsif, "Unexpected text elsif").

if ( "%{NAS-Identifier}" == "ejabberd" ) {
                update request {
                        RESTENA-Service-Type = "Staff-Jabber"
                }
        } else
        if ( "%{NAS-Identifier}" == "AAI-Staff-IdP" ) {
                update request {
                        RESTENA-Service-Type = "Staff-AAI"
                }
        } else
        update request {
                 RESTENA-Service-Type = "Staff-%{client:staff_type}"
        }

But... what's wrong with that? How would I have to fix the syntax to be
acceptable?

Apologies for not spotting it earlier... I run 2.1.x on a test server,
but the test server's config is only slightly more simple than the
production one - it has no "else" in that authorize block.

Stefan Winter

Am 20.06.2011 16:47, schrieb Alan Buxey:
> Hi,
>
>>   It's been a long time since 2.1.10.  We're happy to release version
>> 2.1.11, which has many of useful new features, and a number of minor
>> bugs fixed.
> yay!  :-)   <virtual champagne cork released>
>
>
> however, a nice quirky change in config parser means that any unlang
> style code with an 'if' condition check that end with no space before 
> curlies eg
>
> if (condition){
>
> rather than
>
> if (condition) {
>
>
> causes the daemon to not start...
>
> quick one-line config changer on the command line is:
>
>
> sed -i -e 's/){/) {/g' *
>
> this fixed at least 45 instances of such coding ctyle in my virtual servers
>
>
> alan
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


-- 
Stefan WINTER
Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg

Tel: +352 424409 1
Fax: +352 422473


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110621/323d83e0/attachment.pgp>


More information about the Freeradius-Users mailing list