The if statement can remain the same, add before it:
if (SQL-GROUP =~ /(.*)-.*/) {
        update request {
                SQL-GROUP := "%{1}"
        }
}
This assumes that:
a) There is never a '-' in the USUK or whatever part.
b) You don't need to reference the original SQL-GROUP value.
        If you do, you may want to use something like:
if (SQL-GROUP =~ /(.*)-.*/) {
        update control {
                Tmp-String-0 := "%{1}"
        }
}
if(control:Tmp-String-0 == "USUK") {
        ok
}
etc.

--Mike

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to