Thanks, I updated config and now is accepted.
if ("%{exec:/test/script.sh %{User-Name}}" == "257"){
update control {
Auth-Type := "Accept"
}
}
else {
update control {
Auth-Type := "Reject"
}
However theres another problem, script returns 257 but Exec: program returned: 0
Fri Feb 28 22:59:34 2014 : Info: ++[preprocess] = ok
Fri Feb 28 22:59:34 2014 : Info: ++? if ("%{exec:/test/script.sh %{User-Name}}" == "257")
Fri Feb 28 22:59:34 2014 : Info: Executing /test/script.sh %{User-Name}
Fri Feb 28 22:59:34 2014 : Info: expand: %{User-Name} -> user01
Fri Feb 28 22:59:34 2014 : Debug: Exec output: 257
Fri Feb 28 22:59:34 2014 : Debug: Exec plaintext: 257
Fri Feb 28 22:59:34 2014 : Info: Exec: program returned: 0
Fri Feb 28 22:59:34 2014 : Info: result 0
Fri Feb 28 22:59:34 2014 : Info: expand: %{exec:/test/script.sh %{User-Name}} -> 257
Fri Feb 28 22:59:34 2014 : Info: ? Evaluating ("%{exec:/test/script.sh %{User-Name}}" == "257") -> FALSE
Fri Feb 28 22:59:34 2014 : Info: ++? if ("%{exec:/test/script.sh %{User-Name}}" == "257") -> FALSE
Fri Feb 28 22:59:34 2014 : Info: ++else else {
Fri Feb 28 22:59:34 2014 : Info: +++update control {
What should I do to use output from script (257) directly as result to compare ?