sync
[bitrig.git] / share / man / man5 / myname.5
blobf39f432e6dc8fc0cca1eff5f37f441c736f141f2
1 .\"     $OpenBSD: myname.5,v 1.6 2007/05/31 19:19:58 jmc 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: May 31 2007 $
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
27 The
28 .Nm myname
29 and
30 .Nm mygate
31 files are read by
32 .Xr netstart 8
33 at system startup time.
34 .Pp
35 .Pa /etc/myname
36 contains the symbolic name of the host machine.
37 The file should contain a single line specifying the
38 fully qualified domain name
39 .Pq FQDN
40 of the system
41 .Pq e.g. host.example.com .
42 The name must be resolvable, either by matching a hostname specified in
43 .Pa /etc/hosts
44 (see
45 .Xr hosts 5 )
46 or through DNS
47 (see
48 .Xr resolv.conf 5 ) .
49 The hostname is set via the
50 .Xr hostname 1
51 utility at boot time.
52 See
53 .Xr hostname 7
54 for a description of hostname resolution.
55 .Pp
56 .Pa /etc/mygate ,
57 if it exists,
58 contains the address of the gateway host.
59 The gateway is added to the routing tables by the
60 .Xr route 8
61 utility.
63 .Pa /etc/mygate
64 does not exist, no default gateway is added to the routing tables.
65 The file may contain gateway addresses for both IPv4 and IPv6 networks:
66 in dotted quad notation for v4
67 .Pq e.g. 192.0.2.0
68 or in colon notation for v6
69 .Pq e.g. 2001:1234:5678::1 .
70 Each address must be specified on a separate line.
71 If more than one address of a specific family is found,
72 only the first is used \- all other addresses of that family are ignored.
73 .Pp
74 .Pa /etc/mygate
75 is processed after all interfaces have been configured.
76 If any
77 .Xr hostname.if 5
78 files contain
79 .Dq dhcp
80 directives,
81 IPv4 entries in
82 .Pa /etc/mygate
83 will be ignored.
84 If they contain
85 .Dq rtsol
86 directives,
87 IPv6 entries will be ignored.
88 .Pp
89 Empty lines and lines beginning with
90 .Sq #
91 in either file are ignored.
92 .Sh FILES
93 .Bl -tag -width "/etc/myname" -compact
94 .It Pa /etc/myname
95 Default hostname.
96 .It Pa /etc/mygate
97 Default 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
108 This manual page first appeared in
109 .Ox 3.4 .