[Dnsmasq-discuss] tftp hook for "not found"

Carl Karsten carl at nextdayvideo.com
Thu Dec 2 04:36:47 UTC 2021


or some way to create a symlink when needed.

when a pi net boots, it injects its serial number into the path that
it requests:
dnsmasq-tftp[678]: file /srv/tftp/7a6d27f6/autoboot.txt not found

When thathappens, I need to create a symlink:
id=7a6d27f6
 ln -s  /srv/tftp/boot /srv/tftp/${id}

and ideally catch that before it decides to error.  otherwise I'll
just power cycle the pi and the 2nd time it should work.

if I understand the docs the hook only gets called on "sent" -

"The "tftp" action is invoked when a TFTP file transfer completes: the
arguments are the file size in bytes, the address to which the file
was sent, and the complete pathname of the file. "
https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

I only expect to have 20 - 40 pi's, so it isn't a huge problem if I
have to boot from SD card to harvest the serial number.  but it would
be nice if we didn't need to do that.

-- 
Carl K



More information about the Dnsmasq-discuss mailing list