[Dnsmasq-discuss] Feature Request: tftp-script

richardvoigt at gmail.com richardvoigt at gmail.com
Mon Mar 19 17:51:32 GMT 2012


Existing scripts could definitely break, imagine one that just logs certain
environment variables plus the parameter.  The new action values won't have
the right environment variable set.

How about both?  Give the --tftp-script the same action parameter, and keep
actions unique, that way both options can be pointed to the same script, or
separate scripts.

On Mon, Mar 19, 2012 at 6:18 AM, Simon Kelley <simon at thekelleys.org.uk>wrote:

> On 18/03/12 07:09, Shantanu Gadgil wrote:
>
>> Hi,
>>
>> I was wondering whether it would be possible to have hooks for the TFTP
>> operations, just like the DHCP operations.
>>
>> This is just a rough thought for now ...
>> When a TFTP request is made from the client (or is successful when the
>> file is /actually/ provided), I want to be able to log the IP adress (or
>> maybe send a mail) to collect some data as to how many network based
>> installations actually started, etc.
>>
>> If it could be possible to have the filename as one of the parameters in
>> the hook, it would be even better, as then I can isolate actual
>> installations that started, as opposed to TFTP requests which just loading
>> the PXE menu.
>>
>> Regards,
>> Shantanu
>>
>
> That sounds to me like a very sensible suggestion.
>
> There are two obvious ways to do it: either add an extra hook
> (--tftp-script), or add an extra possible "action" value to the current
> --dhcp-script. I think the later is how I'd do it if starting from scratch,
> but it has the disadvantage of possibly breaking existing script code. On
> the other hand, any sane script should just ignore unrecognised actions;
> the example code supplied with dnsmasq does.
>
> Any script users out there, please check your code, would adding another
> value to {add, old, del, init} break stuff?
>
>
>
> Cheers,
>
> Simon.
>
>
> ______________________________**_________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.**thekelleys.org.uk<Dnsmasq-discuss at lists.thekelleys.org.uk>
> http://lists.thekelleys.org.**uk/mailman/listinfo/dnsmasq-**discuss<http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20120319/e85111d0/attachment.html>


More information about the Dnsmasq-discuss mailing list