Hello, # Q1
Suppose you want to change the host name. You think of hostname, look for /etc/hostname, and find something unrelated. The file /etc/hostname does not exist. The files /etc/hostname.if do exist, but have nothing to do with the host name. By comparison, in linux /etc/hostname exists and serves the intended purpose. This is not intuitive. To understand where the host name is written in OpenBSD, you need to read hostname(1). According to hostname(1) and /etc/rc, the file /etc/myname is responsible for holding the name of a host. Why diverging from intuition? The file /etc/rc includes the following code: ``` # /etc/myname contains my symbolic name. if [[ -f /etc/myname ]]; then hostname "$(stripcom /etc/myname)" fi ``` Is /etc/myname used by something other than /etc/rc? Can we agree that /etc/myname can be safely and easily replaced with /etc/hostname? # Q2 Let now consider /etc/hostname.if, where "if" stands for "interface" and has nothing to do with the conditional statement. The purpose of these files to set network devices, and thus have nothing to do with the host name. Can we agree that /etc/hostname.if makes sense only because of muscle memory, while something like /etc/ifconfig.dev would be more in line with its intended purpose? Thank you for your attention.