Quick question about $ variables
Alan DeKok
aland at deployingradius.com
Tue May 28 18:14:37 CEST 2013
stefan.paetow at diamond.ac.uk wrote:
> Hi all,
>
> I've been looking at using ${...} variables wherever I can and so far it's been relatively successful. The only place where I am stuck is using some comparisons, e.g.
>
> if ("%{Attribute}" == "${variable}") {
That's wrong. Use:
if (Attribute == ${variable}) {
- Attributes can be referenced just by their name. There's no need to
wrap them in "%{...}". That is only for other strings.
- wrapping the ${variable} in "" means it will *not* get expanded when
the configuration file loads.
> The Attribute portion expands, the $-variable part does not (although it is in double-quotes as per the unlang documentation). Quoting the literal value of the variable works.
>
> Am I correct in saying that this is not supported? Just asking so I know how far I can push this :-)
"${variable}" is not supported, and will not be support.
Alan DeKok.
More information about the Freeradius-Users
mailing list