diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-01-02 14:25:08 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-01-02 14:25:08 +0000 |
commit | 445270ab41e8cd4959842a2132caa8b53e2e02a1 (patch) | |
tree | 5470a6edb51bc20ded815510803918b2faba0eb3 | |
parent | 4ae9dcfb00d45b3bb77d7dd494a43f6b4993ed06 (diff) |
add following IPv6 configs: rtadvd_flags route6d_flags rtsold_flags
-rw-r--r-- | etc/rc | 28 | ||||
-rw-r--r-- | etc/rc.conf | 9 |
2 files changed, 35 insertions, 2 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.126 2000/01/01 22:45:35 deraadt Exp $ +# $OpenBSD: rc,v 1.127 2000/01/02 14:25:07 itojun Exp $ # System startup script run by init on autoboot # or after single-user. @@ -384,6 +384,32 @@ if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then echo -n ' dhcpd'; /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs} fi +if ifconfig lo0 inet6 >/dev/null 2>&1; then + fw=`sysctl -n net.inet6.ip6.forwarding` + if [ "X${fw}" == X"0" ]; then + # $rtsold_flags is imported from /etc/rc.conf; + # If $rtsold_flags == NO, then rtsold isn't run. + if [ "X${rtsold_flags}" != X"NO" ]; then + echo -n ' rtsold' + /usr/sbin/rtsold ${rtsold_flags} + fi + else + # $route6d_flags is imported from /etc/rc.conf; + # If $route6d_flags == NO, then route6d isn't run. + if [ "X${route6d_flags}" != X"NO" ]; then + echo -n ' route6d' + /usr/sbin/route6d ${route6d_flags} + fi + # $rtadvd_flags is imported from /etc/rc.conf; + # If $rtadvd_flags == NO or /etc/rtadvd.conf doesn't exist, + # then rtadvd isn't run. + if [ "X${rtadvd_flags}" != X"NO" -a -f /etc/rtadvd.conf ]; then + echo -n ' rtadvd' + /usr/sbin/rtadvd ${rtadvd_flags} + fi + fi +fi + # $rwhod is imported from /etc/rc.conf; # if $rwhod == YES, rwhod is run. if [ X${rwhod} = X"YES" ]; then diff --git a/etc/rc.conf b/etc/rc.conf index efb4e9c6a90..efbb8034554 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.41 1999/11/11 22:28:43 fgsch Exp $ +# $OpenBSD: rc.conf,v 1.42 2000/01/02 14:25:07 itojun Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=NO # for normal use: "-q" @@ -19,6 +19,13 @@ mopd_flags=NO # for normal use: "-a" httpd_flags=NO # for normal use: "" (or "-DSSL" after reading ssl(8)) apmd_flags=NO # for normal use: "" dhcpd_flags=NO # for normal use: "-q" +rtadvd_flags=NO # for normal use: list of interfaces + # be sure to set net.inet6.ip6.forwarding=1 +route6d_flags=NO # for normal use: "" + # be sure to set net.inet6.ip6.forwarding=1 +rtsold_flags=NO # for normal use: interface + # be sure to set net.inet6.ip6.forwarding=0 + # be sure to set net.inet6.ip6.accept_rtadv=1 # Set to NO if ftpd is running out of inetd ftpd_flags=NO # for non-inetd use: "-D" |