I just installed 14.2 on a spare machine. I have used FreeBSD off and on for 20 years or more, and used v14.0 for quite some time on my primary machine until the 14.1 "upgrade" broke the AMD graphics driver. At that point, due to an accumulation of other problems (one with UFS!), which I discussed on this forum, I installed Arch Linux.
That was six months ago and 14.2 is now out, so I decided to try it on a spare machine. After doing just the basic install and creating my account, I scp-ed the /etc/hosts from my primary machine, tweaked it for the machine I was working on and installed it /etc. I've done this countless times in the past. What I found now is that the system appears to be ignoring the hosts file. I can ping my primary machine if I enter its ip address. But if I attempt to ping it by name, the ip address is completely bogus. In fact, if I try to ping the 14.2 from itself by name (its correct ip address is in the hosts file), the same bogus ip address gets used.
Removing the 'search' line from /etc/resolv.conf results in ping reporting that the hostname cannot be resolved. It is obvious that 'ping <hostname>' was ignoring /etc/hosts and using dns despite <hostname> being present in the /etc/hosts file.
Completely on a hunch, I took a look at the hosts file and noted that each of the lines describing a local host began with a tab character. I deleted them, and remarkably, it now works correctly on 14.2. This file with the tabs works fine on Linux, and I've used this file on FreeBSD in the past, so I think this problem was introduced in 14.2, though I can't prove it. From the 'hosts' man page: "Items are separated by any number of blanks and/or tab characters."
I checked /var/log for any indication of an error in processing /etc/hosts and there is none that I could find.
For the presence of white space in a configuration file, undocumented, to break such a basic system function as this is pretty incredible to me.
That was six months ago and 14.2 is now out, so I decided to try it on a spare machine. After doing just the basic install and creating my account, I scp-ed the /etc/hosts from my primary machine, tweaked it for the machine I was working on and installed it /etc. I've done this countless times in the past. What I found now is that the system appears to be ignoring the hosts file. I can ping my primary machine if I enter its ip address. But if I attempt to ping it by name, the ip address is completely bogus. In fact, if I try to ping the 14.2 from itself by name (its correct ip address is in the hosts file), the same bogus ip address gets used.
Removing the 'search' line from /etc/resolv.conf results in ping reporting that the hostname cannot be resolved. It is obvious that 'ping <hostname>' was ignoring /etc/hosts and using dns despite <hostname> being present in the /etc/hosts file.
Completely on a hunch, I took a look at the hosts file and noted that each of the lines describing a local host began with a tab character. I deleted them, and remarkably, it now works correctly on 14.2. This file with the tabs works fine on Linux, and I've used this file on FreeBSD in the past, so I think this problem was introduced in 14.2, though I can't prove it. From the 'hosts' man page: "Items are separated by any number of blanks and/or tab characters."
I checked /var/log for any indication of an error in processing /etc/hosts and there is none that I could find.
For the presence of white space in a configuration file, undocumented, to break such a basic system function as this is pretty incredible to me.