On Sat, 14 Jul 2018, Martin Husemann wrote: > On Sat, Jul 14, 2018 at 06:40:49AM -0400, Greg Troxel wrote: > > My guess, without reading specs, is that the right thing to do is to > > change the in-kernel dhcp client to construct fqdn and use it. > > The in-kernel dhcp client is minimalistic and only extracts enough > data to mount /, and it should not deal with administrative decisions. > > In userland, dhcpcd hooks should set the full name by default, if I read > /libexec/dhcpcd-hooks/30-hostname correctly, not sure what goes wrong here > for John.
I read through that script as well. If I understand correctly, from 'dhcpcd's point of view in the netboot case, the host name is already set ('sysctl -n kern.hostname'), so will use that value (i.e. ignore the host-name sent by the server). The converse could be to arrange for "hostname_fqdn=server" when 'dhcpcd' runs '30-hostname' in the local-disk boot case and get the short name the same as the netboot case (if host entries, host-name options only give short name). That makes MTAs a bit unhappy, though. Probably the simplest route for netbooted systems is to override the hostname with the FQDN in "rc.conf" the same as a statically-configured system. Also might as well not bother with 'dhcpcd' on netbooted x86en either. I'm really only using it to automagically get things like name servers and NTP servers. But "/etc/{resolv,ntp}.conf" are trivial to edit. (In that case, is there a way to manipulate CLIENTHOST in 'xdm's, "Xresources" file so that the short name is extracted for use in the greeter?) I may have stumbled onto another effect of short name (netboot) vs fqdn (local disk boot) when the user's home directory is the same in both cases ('amd'-managed NFS automount), but it will be a while before I can check it again. -- |/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X |\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD | X No HTML/proprietary data in email. BSD just sits there and works! |/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645