diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index ea9a3e97db98..4eca02408828 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.50 2004/06/25 16:25:00 itojun Exp $ +# $NetBSD: Makefile,v 1.51 2004/06/25 16:31:20 wiz Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # missing: dump.5 plot.5 @@ -11,7 +11,8 @@ MAN= a.out.5 acct.5 ar.5 core.5 daily.conf.5 dir.5 disktab.5 elf.5 \ netconfig.5 netgroup.5 networks.5 \ nsswitch.conf.5 passwd.5 passwd.conf.5 phones.5 \ printcap.5 protocols.5 ranlib.5 rc.conf.5 remote.5 \ - resolv.conf.5 rpc.5 security.conf.5 services.5 shells.5 \ + resolv.conf.5 route.conf.5 rpc.5 \ + security.conf.5 services.5 shells.5 \ stab.5 statvfs.5 ttyaction.5 types.5 \ utmp.5 utmpx.5 weekly.conf.5 wscons.conf.5 diff --git a/share/man/man5/route.conf.5 b/share/man/man5/route.conf.5 new file mode 100644 index 000000000000..74150178b217 --- /dev/null +++ b/share/man/man5/route.conf.5 @@ -0,0 +1,88 @@ +.\" $NetBSD: route.conf.5,v 1.1 2004/06/25 16:31:20 wiz Exp $ +.\" +.\" Copyright (c) 2004 Thomas Klausner +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd June 24, 2004 +.Dt ROUTE.CONF 5 +.Os +.Sh NAME +.Nm route.conf +.Nd static routes config file +.Sh DESCRIPTION +The +.Nm +file is read by the +.Pa staticroute +rc.d script during system start-up and shutdown, +and is intended for adding and removing static routes. +.Ss FILE FORMAT +Lines starting with a hash +.Pq Sq # +are comments and ignored. +Lines starting with a plus sign +.Pq Sq + +are run during start-up, +while lines starting with a minus sign +.Pq Sq \- +are run during system shutdown. +All other lines are passed to +.Xr route 8 . +During start-up, they are passed behind a +.Ic route add +command and during shutdown behind a +.Ic route delete +command. +.Sh FILES +.Bl -tag -width XXetcXrouteXconfXX +.It Pa /etc/route.conf +The +.Nm +file resides in +.Pa /etc . +.It Pa /etc/rc.d/staticroute +.Xr rc.d 8 +script that parses +.Nm . +.El +.Sh EXAMPLES +In this example, if the +.Pa staticroute +script is enabled in +.Xr rc.conf 5 , +IP forwarding is turned on during +start-up, and a static route added for 192.168.2.0. +During system shutdown, the route is removed +and IP forwarding turned off. +.Bd -literal -offset indent +# Turn on/off IP forwarding. ++sysctl -w net.inet.ip.forwarding=1 +-sysctl -w net.inet.ip.forwarding=0 +net 192.168.2.0 -netmask 255.255.255.0 192.168.150.2 +.Ed +.Sh SEE ALSO +.Xr rc.conf 5 , +.Xr rc 8 , +.Xr route 8