To prevent my hostname from being set by DHCP, I have this:

kenyon@devildog ~ % grep -i hostname /etc/hostconfig
HOSTNAME=devildog.kenyonralph.com

In System Preferences, Sharing, Computer Name should be set to the FQDN. The .local name will just be the first part.

hostname should return the FQDN (devildog.kenyonralph.com), and hostname -s should return just the first part (devildog).

References