Is it technically possible to make a DHCP lease script which adds a DNS record for a device through its MAC address, but instead of making it static (or maybe it does?), applies it to the IP address assigned through DHCP? The MAC addresses for these specific devices could be added to the script as variables or in an array.
While I do not yet understand the RouterOS scripting language or know of its capabilities/limitations, I get the idea that this may be possible by looking at another script which I use that adds static DNS entries for devices that get their IP address through DHCP.
https://blog.pessoft.com/2019/09/06/mik ... cp-leases/
So I am asking if this is possible before I attempt to learn how to do it. The reason for wanting this is for a similar reason I use the script above: so that the devices appear in Pi-Hole's interface statistics as hostnames, although this time for devices that don't actually have hostnames through DHCP (option 12?).
At the moment I am giving these devices static addresses through DHCP and manually making DNS records for them. The purpose of the script would be to have it occur with dynamic IP addresses in a similar way to the other script, but with MAC addresses and (DNS) hostnames supplied for these specific devices. This way nothing further would have to be done if the devices are moved to another VLAN.