For what it's worth, a long time ago I had luck adding an exit hook to the DHCP response, as follows:
Code:
# /etc/dhcpcd.exit-hook - sets the host name from DHCP data
# In Ubuntu: /lib/dhcpcd/dhcpcd-hooks/30-hostname (dhcpcd5)
# Called by: /libexec/dhcpcd-run-hooks
if $if_up; then
if [ -n "$new_host_name" ]; then
hostname "$new_host_name"
fi
fi
I wanted to set the host name as provided by my router in the DHCP response, but perhaps you could set the MAC address here instead.