head 1.5; access; symbols netbsd-8-3-RELEASE:1.5 netbsd-9-4-RELEASE:1.5 netbsd-10-0-RELEASE:1.5 netbsd-10-0-RC6:1.5 netbsd-10-0-RC5:1.5 netbsd-10-0-RC4:1.5 netbsd-10-0-RC3:1.5 netbsd-10-0-RC2:1.5 netbsd-10-0-RC1:1.5 netbsd-10:1.5.0.42 netbsd-10-base:1.5 netbsd-9-3-RELEASE:1.5 cjep_sun2x-base1:1.5 cjep_sun2x:1.5.0.40 cjep_sun2x-base:1.5 cjep_staticlib_x-base1:1.5 netbsd-9-2-RELEASE:1.5 cjep_staticlib_x:1.5.0.38 cjep_staticlib_x-base:1.5 netbsd-9-1-RELEASE:1.5 phil-wifi-20200421:1.5 phil-wifi-20200411:1.5 is-mlppp:1.5.0.36 is-mlppp-base:1.5 phil-wifi-20200406:1.5 netbsd-8-2-RELEASE:1.5 netbsd-9-0-RELEASE:1.5 netbsd-9-0-RC2:1.5 netbsd-9-0-RC1:1.5 phil-wifi-20191119:1.5 netbsd-9:1.5.0.34 netbsd-9-base:1.5 phil-wifi-20190609:1.5 netbsd-8-1-RELEASE:1.5 netbsd-8-1-RC1:1.5 pgoyette-compat-merge-20190127:1.5 pgoyette-compat-20190127:1.5 pgoyette-compat-20190118:1.5 pgoyette-compat-1226:1.5 pgoyette-compat-1126:1.5 pgoyette-compat-1020:1.5 pgoyette-compat-0930:1.5 pgoyette-compat-0906:1.5 netbsd-7-2-RELEASE:1.5 pgoyette-compat-0728:1.5 netbsd-8-0-RELEASE:1.5 phil-wifi:1.5.0.32 phil-wifi-base:1.5 pgoyette-compat-0625:1.5 netbsd-8-0-RC2:1.5 pgoyette-compat-0521:1.5 pgoyette-compat-0502:1.5 pgoyette-compat-0422:1.5 netbsd-8-0-RC1:1.5 pgoyette-compat-0415:1.5 pgoyette-compat-0407:1.5 pgoyette-compat-0330:1.5 pgoyette-compat-0322:1.5 pgoyette-compat-0315:1.5 netbsd-7-1-2-RELEASE:1.5 pgoyette-compat:1.5.0.30 pgoyette-compat-base:1.5 netbsd-7-1-1-RELEASE:1.5 matt-nb8-mediatek:1.5.0.28 matt-nb8-mediatek-base:1.5 perseant-stdc-iso10646:1.5.0.26 perseant-stdc-iso10646-base:1.5 netbsd-8:1.5.0.24 netbsd-8-base:1.5 prg-localcount2-base3:1.5 prg-localcount2-base2:1.5 prg-localcount2-base1:1.5 prg-localcount2:1.5.0.22 prg-localcount2-base:1.5 pgoyette-localcount-20170426:1.5 bouyer-socketcan-base1:1.5 pgoyette-localcount-20170320:1.5 netbsd-7-1:1.5.0.20 netbsd-7-1-RELEASE:1.5 netbsd-7-1-RC2:1.5 netbsd-7-nhusb-base-20170116:1.5 bouyer-socketcan:1.5.0.18 bouyer-socketcan-base:1.5 pgoyette-localcount-20170107:1.5 netbsd-7-1-RC1:1.5 pgoyette-localcount-20161104:1.5 netbsd-7-0-2-RELEASE:1.5 localcount-20160914:1.5 netbsd-7-nhusb:1.5.0.16 netbsd-7-nhusb-base:1.5 pgoyette-localcount-20160806:1.5 pgoyette-localcount-20160726:1.5 pgoyette-localcount:1.5.0.14 pgoyette-localcount-base:1.5 netbsd-7-0-1-RELEASE:1.5 netbsd-7-0:1.5.0.12 netbsd-7-0-RELEASE:1.5 netbsd-7-0-RC3:1.5 netbsd-7-0-RC2:1.5 netbsd-7-0-RC1:1.5 netbsd-5-2-3-RELEASE:1.3.2.1 netbsd-5-1-5-RELEASE:1.3 netbsd-6-0-6-RELEASE:1.3.20.1 netbsd-6-1-5-RELEASE:1.3.20.1 netbsd-7:1.5.0.10 netbsd-7-base:1.5 yamt-pagecache-base9:1.5 yamt-pagecache-tag8:1.3.18.1 netbsd-6-1-4-RELEASE:1.3.20.1 netbsd-6-0-5-RELEASE:1.3.20.1 tls-earlyentropy:1.5.0.8 tls-earlyentropy-base:1.5 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5 riastradh-drm2-base3:1.5 netbsd-6-1-3-RELEASE:1.3.20.1 netbsd-6-0-4-RELEASE:1.3.20.1 netbsd-5-2-2-RELEASE:1.3.2.1 netbsd-5-1-4-RELEASE:1.3 netbsd-6-1-2-RELEASE:1.3.20.1 netbsd-6-0-3-RELEASE:1.3.20.1 netbsd-5-2-1-RELEASE:1.3.2.1 netbsd-5-1-3-RELEASE:1.3 netbsd-6-1-1-RELEASE:1.3.20.1 riastradh-drm2-base2:1.5 riastradh-drm2-base1:1.5 riastradh-drm2:1.5.0.4 riastradh-drm2-base:1.5 netbsd-6-1:1.3.20.1.0.6 netbsd-6-0-2-RELEASE:1.3.20.1 netbsd-6-1-RELEASE:1.3.20.1 netbsd-6-1-RC4:1.3.20.1 netbsd-6-1-RC3:1.3.20.1 agc-symver:1.5.0.6 agc-symver-base:1.5 netbsd-6-1-RC2:1.3.20.1 netbsd-6-1-RC1:1.3.20.1 yamt-pagecache-base8:1.5 netbsd-5-2:1.3.2.1.0.2 netbsd-6-0-1-RELEASE:1.3.20.1 yamt-pagecache-base7:1.5 netbsd-5-2-RELEASE:1.3.2.1 netbsd-5-2-RC1:1.3.2.1 matt-nb6-plus-nbase:1.3.20.1 yamt-pagecache-base6:1.5 netbsd-6-0:1.3.20.1.0.4 netbsd-6-0-RELEASE:1.3.20.1 netbsd-6-0-RC2:1.3.20.1 tls-maxphys:1.5.0.2 tls-maxphys-base:1.5 matt-nb6-plus:1.3.20.1.0.2 matt-nb6-plus-base:1.3.20.1 netbsd-6-0-RC1:1.3.20.1 yamt-pagecache-base5:1.5 yamt-pagecache-base4:1.3 netbsd-6:1.3.0.20 netbsd-6-base:1.3 netbsd-5-1-2-RELEASE:1.3 netbsd-5-1-1-RELEASE:1.3 yamt-pagecache-base3:1.3 yamt-pagecache-base2:1.3 yamt-pagecache:1.3.0.18 yamt-pagecache-base:1.3 cherry-xenmp:1.3.0.16 cherry-xenmp-base:1.3 bouyer-quota2-nbase:1.3 bouyer-quota2:1.3.0.14 bouyer-quota2-base:1.3 matt-mips64-premerge-20101231:1.3 matt-nb5-mips64-premerge-20101231:1.3 matt-nb5-pq3:1.3.0.12 matt-nb5-pq3-base:1.3 netbsd-5-1:1.3.0.10 netbsd-5-1-RELEASE:1.3 netbsd-5-1-RC4:1.3 matt-nb5-mips64-k15:1.3 netbsd-5-1-RC3:1.3 netbsd-5-1-RC2:1.3 netbsd-5-1-RC1:1.3 netbsd-5-0-2-RELEASE:1.3 matt-nb5-mips64-premerge-20091211:1.3 matt-premerge-20091211:1.3 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.3 matt-nb4-mips64-k7-u2a-k9b:1.3 matt-nb5-mips64-u1-k1-k5:1.3 matt-nb5-mips64:1.3.0.8 netbsd-5-0-1-RELEASE:1.3 jym-xensuspend-nbase:1.3 netbsd-5-0:1.3.0.6 netbsd-5-0-RELEASE:1.3 netbsd-5-0-RC4:1.3 netbsd-5-0-RC3:1.3 netbsd-5-0-RC2:1.3 jym-xensuspend:1.3.0.4 jym-xensuspend-base:1.3 netbsd-5-0-RC1:1.3 netbsd-5:1.3.0.2 netbsd-5-base:1.3 matt-mips64-base2:1.3 matt-mips64:1.2.0.34 netbsd-4-0-1-RELEASE:1.2 wrstuden-revivesa-base-3:1.3 wrstuden-revivesa-base-2:1.3 wrstuden-fixsa-newbase:1.2 wrstuden-revivesa-base-1:1.3 yamt-pf42-base4:1.3 yamt-pf42-base3:1.3 hpcarm-cleanup-nbase:1.3 yamt-pf42-baseX:1.2 yamt-pf42-base2:1.3 wrstuden-revivesa:1.2.0.32 wrstuden-revivesa-base:1.3 yamt-pf42:1.2.0.30 yamt-pf42-base:1.2 mjf-devfs2:1.2.0.28 mjf-devfs2-base:1.3 keiichi-mipv6-nbase:1.2 keiichi-mipv6:1.2.0.26 keiichi-mipv6-base:1.2 matt-armv6-nbase:1.2 matt-armv6-prevmlocking:1.2 wrstuden-fixsa-base-1:1.2 netbsd-4-0:1.2.0.24 netbsd-4-0-RELEASE:1.2 cube-autoconf:1.2.0.22 cube-autoconf-base:1.2 netbsd-4-0-RC5:1.2 netbsd-4-0-RC4:1.2 netbsd-4-0-RC3:1.2 netbsd-4-0-RC2:1.2 netbsd-4-0-RC1:1.2 matt-armv6:1.2.0.20 matt-armv6-base:1.2 matt-mips64-base:1.2 hpcarm-cleanup:1.2.0.18 hpcarm-cleanup-base:1.2 netbsd-3-1-1-RELEASE:1.2 netbsd-3-0-3-RELEASE:1.2 wrstuden-fixsa:1.2.0.16 wrstuden-fixsa-base:1.2 abandoned-netbsd-4-base:1.2 abandoned-netbsd-4:1.2.0.10 netbsd-3-1:1.2.0.12 netbsd-3-1-RELEASE:1.2 netbsd-3-0-2-RELEASE:1.2 netbsd-3-1-RC4:1.2 netbsd-3-1-RC3:1.2 netbsd-3-1-RC2:1.2 netbsd-3-1-RC1:1.2 netbsd-4:1.2.0.14 netbsd-4-base:1.2 chap-midi-nbase:1.2 netbsd-3-0-1-RELEASE:1.2 chap-midi:1.2.0.8 chap-midi-base:1.2 netbsd-3-0:1.2.0.6 netbsd-3-0-RELEASE:1.2 netbsd-3-0-RC6:1.2 netbsd-3-0-RC5:1.2 netbsd-3-0-RC4:1.2 netbsd-3-0-RC3:1.2 netbsd-3-0-RC2:1.2 netbsd-3-0-RC1:1.2 netbsd-2-0-3-RELEASE:1.2.2.2 netbsd-2-1:1.2.2.2.0.4 netbsd-2-1-RELEASE:1.2.2.2 netbsd-2-1-RC6:1.2.2.2 netbsd-2-1-RC5:1.2.2.2 netbsd-2-1-RC4:1.2.2.2 netbsd-2-1-RC3:1.2.2.2 netbsd-2-1-RC2:1.2.2.2 netbsd-2-1-RC1:1.2.2.2 netbsd-2-0-2-RELEASE:1.2.2.2 netbsd-3:1.2.0.4 netbsd-3-base:1.2 netbsd-2-0-1-RELEASE:1.2.2.2 netbsd-2:1.2.2.2.0.2 netbsd-2-base:1.2.2.2 netbsd-2-0-RELEASE:1.2.2.2 netbsd-2-0-RC5:1.2.2.2 netbsd-2-0-RC4:1.2.2.2 netbsd-2-0-RC3:1.2.2.2 netbsd-2-0-RC2:1.2.2.2 netbsd-2-0:1.2.0.2; locks; strict; comment @.\" @; 1.5 date 2012.05.02.22.38.31; author wiz; state Exp; branches; next 1.4; 1.4 date 2012.05.02.15.57.15; author gendalia; state Exp; branches; next 1.3; 1.3 date 2008.05.08.15.34.39; author wiz; state Exp; branches 1.3.2.1 1.3.18.1 1.3.20.1; next 1.2; 1.2 date 2004.06.28.13.44.12; author wiz; state Exp; branches 1.2.2.1 1.2.28.1 1.2.30.1 1.2.32.1; next 1.1; 1.1 date 2004.06.25.16.31.20; author wiz; state Exp; branches; next ; 1.3.2.1 date 2012.05.19.16.48.36; author riz; state Exp; branches; next ; 1.3.18.1 date 2012.05.23.10.07.35; author yamt; state Exp; branches; next ; 1.3.20.1 date 2012.05.07.03.16.44; author riz; state Exp; branches; next ; 1.2.2.1 date 2004.06.28.13.44.12; author jmc; state dead; branches; next 1.2.2.2; 1.2.2.2 date 2004.10.01.03.33.40; author jmc; state Exp; branches; next ; 1.2.28.1 date 2008.06.02.13.21.40; author mjf; state Exp; branches; next ; 1.2.30.1 date 2008.05.18.12.31.10; author yamt; state Exp; branches; next ; 1.2.32.1 date 2008.06.23.04.30.01; author wrstuden; state Exp; branches; next ; desc @@ 1.5 log @Remove trailing whitespace. @ text @.\" $NetBSD: route.conf.5,v 1.4 2012/05/02 15:57:15 gendalia 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. .\" .\" 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 May 1, 2012 .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. If a line starts with a .Sq \&! , the rest of the line will get evaluated as a shell script fragment. All other lines are passed to .Xr route 8 . During start-up, they are passed behind a .Dq Ic route add \- command and during shutdown behind a .Dq 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, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added during startup, or deleted during system shutdown. .Bd -literal -offset indent # Set interface and determine current IP address for added route. !ifname=bnx0 !ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}') net 10.10.1 -interface ${ipaddr} .Ed .Pp In this example, 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 @ 1.4 log @Add the ability for staticroute to evaluate lines from /etc/route.conf as shell script fragments, add example to the route.conf man page of evaluating variables. Remove route.conf man page statement that staticroute is enabled in rc.conf since that's incorrect. Wrap the staticroute while in parens, per & , and quote all the arguments for the evals. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.3 2008/05/08 15:34:39 wiz Exp $ d75 1 a75 1 .Bd -literal -offset indent @ 1.3 log @2-clause my license. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.2 2004/06/28 13:44:12 wiz Exp $ d26 1 a26 1 .Dd June 24, 2004 d49 3 d72 11 a82 4 In this example, if the .Pa staticroute script is enabled in .Xr rc.conf 5 , @ 1.3.18.1 log @sync with head. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.3 2008/05/08 15:34:39 wiz Exp $ d26 1 a26 1 .Dd May 1, 2012 a48 3 If a line starts with a .Sq \&! , the rest of the line will get evaluated as a shell script fragment. d69 4 a72 11 In this example, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added during startup, or deleted during system shutdown. .Bd -literal -offset indent # Set interface and determine current IP address for added route. !ifname=bnx0 !ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}') net 10.10.1 -interface ${ipaddr} .Ed .Pp In this example, @ 1.3.2.1 log @Pull up following revision(s) (requested by gendalia in ticket #1757): share/man/man5/route.conf.5: revision 1.4 etc/rc.d/staticroute: revision 1.4 etc/rc.d/staticroute: revision 1.5 etc/rc.d/staticroute: revision 1.6 Add a "return 0" to avoid incorrect error returns because we ran out of lines to read from "/etc/route.conf". Add proper error reporting via the return code: Remember if any of the "route" commands failed and return an error in that case. Add the ability for staticroute to evaluate lines from /etc/route.conf as shell script fragments, add example to the route.conf man page of evaluating variables. Remove route.conf man page statement that staticroute is enabled in rc.conf since that's incorrect. Wrap the staticroute while in parens, per & , and quote all the arguments for the evals. @ text @d1 1 a1 1 .\" $NetBSD$ d26 1 a26 1 .Dd May 1, 2012 a48 3 If a line starts with a .Sq \&! , the rest of the line will get evaluated as a shell script fragment. d69 4 a72 11 In this example, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added during startup, or deleted during system shutdown. .Bd -literal -offset indent # Set interface and determine current IP address for added route. !ifname=bnx0 !ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}') net 10.10.1 -interface ${ipaddr} .Ed .Pp In this example, @ 1.3.20.1 log @Pull up following revision(s) (requested by gendalia in ticket #211): share/man/man5/route.conf.5: revision 1.4 etc/rc.d/staticroute: revision 1.6 Add the ability for staticroute to evaluate lines from /etc/route.conf as shell script fragments, add example to the route.conf man page of evaluating variables. Remove route.conf man page statement that staticroute is enabled in rc.conf since that's incorrect. Wrap the staticroute while in parens, per & , and quote all the arguments for the evals. @ text @d1 1 a1 1 .\" $NetBSD$ d26 1 a26 1 .Dd May 1, 2012 a48 3 If a line starts with a .Sq \&! , the rest of the line will get evaluated as a shell script fragment. d69 4 a72 11 In this example, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added during startup, or deleted during system shutdown. .Bd -literal -offset indent # Set interface and determine current IP address for added route. !ifname=bnx0 !ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}') net 10.10.1 -interface ${ipaddr} .Ed .Pp In this example, @ 1.2 log @Add the minus sign that is behind route {add|delete} by default. Noted by christos. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.1 2004/06/25 16:31:20 wiz Exp $ a13 2 .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission @ 1.2.2.1 log @file route.conf.5 was added on branch netbsd-2-0 on 2004-10-01 03:33:40 +0000 @ text @d1 88 @ 1.2.2.2 log @Pullup patch (requested by cube in ticket #877) Add documentation for route.conf @ text @a0 88 .\" $NetBSD: route.conf.5,v 1.2.2.1 2004/10/01 03:33:40 jmc 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 .Dq Ic route add \- command and during shutdown behind a .Dq 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 @ 1.2.32.1 log @Sync w/ -current. 34 merge conflicts to follow. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.2 2004/06/28 13:44:12 wiz Exp $ d14 2 @ 1.2.28.1 log @Sync with HEAD. @ text @d1 1 a1 1 .\" $NetBSD$ d14 2 @ 1.2.30.1 log @sync with head. @ text @d1 1 a1 1 .\" $NetBSD: route.conf.5,v 1.2 2004/06/28 13:44:12 wiz Exp $ d14 2 @ 1.1 log @Add route.conf(5). Closes PR 25818 by mrg. @ text @d1 1 a1 1 .\" $NetBSD$ d54 1 a54 1 .Ic route add d56 1 a56 1 .Ic route delete @