[Kea-users] what does ach dhcpv4 hook point/parameter mean ?
luckydog xf
luckydogxf at gmail.com
Thu Aug 8 07:54:39 UTC 2024
Actually I have tested lease4_expire, leases4_committed and lease4_renew
already. They're easy to verify.
But the rest ones, I don't understand which scenarios can call them.
Thanks.
On Thu, Aug 8, 2024 at 3:52 PM luckydog xf <luckydogxf at gmail.com> wrote:
> Thanks for your reply.
> Actually, I have read that docs already. However, I'm still puzzled. I'm
> going to add and remove DNS records against Samba with kea-dhcp hook
> points, which is the same as DDNS.
>
> Here is the skeleton of my bash script. Not sure if the action for each
> hook point is right or not.
> While add_record and delete_record are public functions.
> ---
> # hook points
> case "$1" in
>
> lease4_renew|lease4_recover )
>
> # Do nothing
> echo $1
> exit 0
> ;;
>
> leases4_committed)
>
> echo $1
> delete_record
> add_record
> ;;
>
> lease4_expire |lease4_release) #|lease4_decline)
> echo $1
>
> delete_record
> ;;
>
> *)
> echo "Unhandled function call ${*}"
> exit 123
> ;;
> esac
>
>
> On Thu, Aug 8, 2024 at 3:38 PM Francis Dupont <fdupont at isc.org> wrote:
>
>> luckydog xf writes:
>> > I'm running External Hook Scripts now. From
>> > https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html there are the
>> > following hook points.
>>
>> => the right documentation for writing hooks is not the ARM but
>> the developer guide and its Hook Developer's Guide section
>> https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html
>>
>> If you can't find all answers to your questions please come back to
>> this mailing list.
>>
>> BTW names as LEASES4_AT0_HOSTNAME are about a particular hook library
>> running shell scripts described in its own section of the ARM
>> (Run Script Support for External Hook Scripts) which in fact just
>> exposes parameters which can be read from some callout points.
>>
>> Regards
>>
>> Francis Dupont <fdupont at isc.org>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240808/458c016f/attachment.htm>
More information about the Kea-users
mailing list