On Sun, 2022-01-16 at 23:25 -0600, Thomas Cameron wrote: > As a dirty hack, I created a file /etc/profile.d/hostname.sh: > MYIP=`hostname -I` > MYHOSTNAME=`host $MYIP | awk '{ print $NF }' | sed "s/\.$//"` > echo $MYHOSTNAME > /etc/hostname > hostnamectl hostname $MYHOSTNAME > That sets the hostname correctly but it's a dirty hack in that it > requires someone to actually log in to run the trigger the profile.d > stuff. I am trying to find where in the dhclient stuff I should work > to have the hostname set correctly from dhcp/dns resolution. It's > frustrating that with F34 and F35, the systemd-hostnamed.service is > supposed to do this but I'm not seeing where to make it do what I > want it to. I've played with the > /etc/NetworkManager/NetworkManager.conf file setting the hostname- > mode=default in [main] but it's not working. Any useful clues from these pages: https://forum.manjaro.org/t/how-to-set-the-hostname-assigned-by-dhcp-server/35569/2 https://www.linuxsecrets.com/1675-configure-linux-to-broadcast-dhcp-client-hostname-in-linux https://askubuntu.com/questions/104918/how-to-get-the-hostname-from-a-dhcp-server https://www.google.com/search?q=fedora+dhcp+client+accepting+hostname+from+server What we've been discussing is something I've often meant to get around to doing, myself. But I just persevere with manually adjusting a few things, here. I only have a small network, so it hasn't bugged me sufficiently, yet. And my brain is going on strike, at the moment (migraine brain fog). But the first link I supplied suggested simply delete /etc/hostname -- uname -rsvp Linux 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 Boilerplate: All unexpected mail to my mailbox is automatically deleted. I will only get to see the messages that are posted to the mailing list. _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure