NAME
myname
, mygate
— default hostname and
gateway
DESCRIPTION
The myname
and
mygate
files are read by
netstart(8) at system startup time.
/etc/myname contains the symbolic name of the host machine. The file should contain a single line specifying the fully qualified domain name (FQDN) of the system (e.g. host.example.com). The name must be resolvable, either by matching a hostname specified in /etc/hosts (see hosts(5)) or through DNS (see resolv.conf(5)). The hostname is set via the hostname(1) utility at boot time. See hostname(7) for a description of hostname resolution.
/etc/mygate, if it exists, contains the address of the gateway host. The gateway is added to the routing tables by the route(8) utility. If /etc/mygate does not exist, no default gateway is added to the routing tables. The file may contain gateway addresses for both IPv4 and IPv6 networks: in dotted quad notation for v4 (e.g. 192.0.2.1) or in colon notation for v6 (e.g. 2001:db8::1). Each address must be specified on a separate line. If more than one address of a specific family is found, only the first is used - all other addresses of that family are ignored.
/etc/mygate is processed after all interfaces have been configured. If any hostname.if(5) files contain “dhcp” directives, IPv4 entries in /etc/mygate will be ignored. If they contain “autoconf” directives, IPv6 entries will be ignored.
Empty lines and lines beginning with ‘#’ in either file are ignored.
FILES
- /etc/myname
- Default hostname.
- /etc/mygate
- Default gateway address(es).
SEE ALSO
hostname(1), hostname.if(5), hosts(5), resolv.conf(5), hostname(7), netstart(8), route(8)
HISTORY
This manual page first appeared in OpenBSD 3.4.