(RADIATOR) Chaining multiple Hooks?
Jan Tomasek
jan at tomasek.cz
Wed Jan 17 14:32:59 CST 2007
Hello,
I've AuthBy like this:
<AuthBy RADIUS>
Identifier radius1.cesnet.cz
RetryTimeout 3
Retries 1
FailureBackoffTime 0
UseExtendedIds
<Host radius1.cesnet.cz>
AuthPort 1812
AcctPort 1813
Secret xxx
</Host>
NoReplyHook file:"/etc/radiator/dr_no-reply-hook.pl"
ReplyHook file:"/etc/radiator/dr_reply-hook.pl"
</AuthBy>
But I need to use there three different pieces of code. When I use
multiple lines like:
ReplyHook file:"/etc/radiator/hook1.pl"
ReplyHook file:"/etc/radiator/hook2.pl"
ReplyHook file:"/etc/radiator/dr_reply-hook.pl"
than only last one is used. When I try to put them one line, Radiator
says that it cannot open file like
file:"/etc/radiator/hook1.pl",file:"/etc/radiator/hook2.pl" ...
Is there any way how to use multiple hooks of one type?
I guess it might be possible to use code like this
my $y_src = `cat /home/semik/tmp/y.pl`;
my $z_src = `cat /home/semik/tmp/z.pl`;
my $main::code_y = eval ($y_src);
my $main::code_z = eval ($z_src);
in startupHook and later define
ReplyHook = sub { &$main::code_y(@_); &$main::code_z(@_); };
it might work, but in my option it is quite ugly ;)
The question is if there is better way, except of putting all hooks code
into one file, which I don't like.
Thanks for any sugestions
--
-----------------------
Jan Tomasek aka Semik
http://www.tomasek.cz/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://www.open.com.au/pipermail/radiator/attachments/20070117/3149562b/attachment.bin>
More information about the radiator
mailing list