On Mon, Mar 24, 2025 at 5:40 PM Peter N. M. Hansteen <pe...@bsdly.net> wrote:
> The /etc/myname and /etc/mygate have been in OpenBSD for as far back as I can
> remember tinkering with the system, and it would not surprise me a whole lot
> if the naming was decided back in the CSRG days or possibly even earlier.

Because I was curious, and Brian Conway had replied that this dated
back to the very first commit of OpenBSD in Oct. 1995 [1], when it was
forked from NetBSD, I went looking through the NetBSD history.
Evidently support for /etc/my{name,gate} and /etc/hostname.* was added
in Apr. 1993, just before the release of NetBSD 0.8 [2].

If I'm reading the diff correctly, it looks like prior to this, you
had to edit your hostname directly into /etc/netstart and set the
netmask in /etc/networks!  And it also just attempted to configure all
known interface types with this information and hope that one
succeeded, e.g.
  ifconfig we0 inet $hostname netmask my-netmask
  ifconfig ne0 inet $hostname netmask my-netmask
  etc.


-Andrew

[1] 
https://github.com/openbsd/src/blob/df930be708d50e9715f173caa26ffe1b7599b157/etc/netstart#L29
[2] 
https://github.com/NetBSD/src/commit/80e5f01ba42eb7e7bc57b9dfe71a889ab11f995c

Reply via email to