xref: /openbsd/share/man/man5/myname.5 (revision cecf84d4)
1.\"	$OpenBSD: myname.5,v 1.7 2014/12/31 13:56:37 lum Exp $
2.\"
3.\" Copyright (c) 2003 Jason McIntyre <jmc@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: December 31 2014 $
18.Dt MYNAME 5
19.Os
20.Sh NAME
21.Nm myname , mygate
22.Nd default hostname and gateway
23.Sh SYNOPSIS
24.Nm /etc/myname
25.Nm /etc/mygate
26.Sh DESCRIPTION
27The
28.Nm myname
29and
30.Nm mygate
31files are read by
32.Xr netstart 8
33at system startup time.
34.Pp
35.Pa /etc/myname
36contains the symbolic name of the host machine.
37The file should contain a single line specifying the
38fully qualified domain name
39.Pq FQDN
40of the system
41.Pq e.g. host.example.com .
42The name must be resolvable, either by matching a hostname specified in
43.Pa /etc/hosts
44(see
45.Xr hosts 5 )
46or through DNS
47(see
48.Xr resolv.conf 5 ) .
49The hostname is set via the
50.Xr hostname 1
51utility at boot time.
52See
53.Xr hostname 7
54for a description of hostname resolution.
55.Pp
56.Pa /etc/mygate ,
57if it exists,
58contains the address of the gateway host.
59The gateway is added to the routing tables by the
60.Xr route 8
61utility.
62If
63.Pa /etc/mygate
64does not exist, no default gateway is added to the routing tables.
65The file may contain gateway addresses for both IPv4 and IPv6 networks:
66in dotted quad notation for v4
67.Pq e.g. 192.0.2.1
68or in colon notation for v6
69.Pq e.g. 2001:db8::1 .
70Each address must be specified on a separate line.
71If more than one address of a specific family is found,
72only the first is used \- all other addresses of that family are ignored.
73.Pp
74.Pa /etc/mygate
75is processed after all interfaces have been configured.
76If any
77.Xr hostname.if 5
78files contain
79.Dq dhcp
80directives,
81IPv4 entries in
82.Pa /etc/mygate
83will be ignored.
84If they contain
85.Dq rtsol
86directives,
87IPv6 entries will be ignored.
88.Pp
89Empty lines and lines beginning with
90.Sq #
91in either file are ignored.
92.Sh FILES
93.Bl -tag -width "/etc/myname" -compact
94.It Pa /etc/myname
95Default hostname.
96.It Pa /etc/mygate
97Default gateway address(es).
98.El
99.Sh SEE ALSO
100.Xr hostname 1 ,
101.Xr hostname.if 5 ,
102.Xr hosts 5 ,
103.Xr resolv.conf 5 ,
104.Xr hostname 7 ,
105.Xr netstart 8 ,
106.Xr route 8
107.Sh HISTORY
108This manual page first appeared in
109.Ox 3.4 .
110