Gentelmen, finally  got it.
Works as inteneded.
Many thanks.

ps hopefully values will be returned properly:)


On Thu, May 8, 2014 at 12:26 AM, Serge Krawczenko <skrawczenko@gmail.com> wrote:
all i need is just to invoke my python script from dhcp section to perform my actions and return some values.

if i got it right, there are handlers in python module, for corresponding sections in radiusd.conf

for example, i have instantiate section in radiusd.conf and def instantiate(_params) function in my script and it is being invoked successfully

there's python module config as well, where we define module and appropriate function for each event, such as

    mod_instantiate = "test_freeradius"
    func_instantiate = "instantiate"

next, i've not found any mention of 'dhcp' section in rlm_python sources and even added it.

and added module and func_dhcp='dhcp' in the module config
nothing happened indeed

now, the question.

how do i call my python function from dhcp {whatever} section?

python script is being called but there's no entry point,
like 'python returns noop'
therefore i can't return any values into radius instance.

weird feeling i'm doing it first in the universe, please any help appreciated, spent over a week on this issue.
thanks.

ps i dont need any auth, acct, detail, post-auth logic. all i need is to call my python scipt from dhcp section and return values.