View Single Post
Old 07-15-2024, 10:14 AM   #17
jgneff
Member
jgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the party
 
jgneff's Avatar
 
Posts: 21
Karma: 147742
Join Date: Nov 2017
Location: Vancouver, BC, Canada
Device: Kobo Touch B/C, Kobo Glo HD, Kobo Clara HD, Kobo Libra 2
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.
jgneff is offline   Reply With Quote